function spherical_harmonic_values_test ( )

%*****************************************************************************80
%
%% spherical_harmonic_values_test() tests spherical_harmonic_values().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    03 November 2005
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'spherical_harmonic_values_test():\n' );
  fprintf ( 1, '  spherical_harmonic_values() stores values of\n' );
  fprintf ( 1, '  the spherical harmonic function.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '   L   M    THETA   PHI               YR                YI\n' );
  fprintf ( 1, '\n' );

  n_data = 0;

  while ( true )

    [ n_data, l, m, theta, phi, yr, yi ] = spherical_harmonic_values ( n_data );

    if ( n_data == 0 )
      break
    end

    fprintf ( 1, '  %2d  %2d  %8f  %8f  %24.16f  %24.16f\n', ...
      l, m, theta, phi, yr, yi );

  end

  return
end
