function p00_sol_test ( )

%*****************************************************************************80
%
%% p00_sol_test() tests p00_sol().
%
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    03 March 2026
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'p00_sol_test():\n' );
  fprintf ( 1, '  p00_sol() returns an n vector x which is an approximate\n' );
  fprintf ( 1, '  minimizer of the objective function p00_f(x).\n' );
%
%  Get the number of tests.
%
  test_num = p00_test_num ( );

  for test = 1 : test_num

    [ m, n ] = p00_mn ( test );

    if ( test == 11 )
      m = 31;
      n = 5;
    elseif ( 0 < m && 0 < n )
      
    elseif ( m < 0 )
      if ( 0 < n )
        m = n + 2;
      elseif ( -10 == n )
        m = 5;
        n = 5;
      else
        m = 5;
        n = 3;
      end
    end

    title = p00_title ( test );
    x = p00_sol ( test, m, n );
    fprintf ( 1, '\n' );
    fprintf ( 1, '  %d "%s"\n', test, title );
    fprintf ( 1, '  m = %d, n = %d\n', m, n );

    if ( isempty ( x ) )
      fprintf ( 1, '  An approximate solution is not given!\n' );
    else
      fx = p00_f ( test, m, n, x );
      fprintf ( 1, '  ||x|| = %g\n', norm ( x ) );
      fprintf ( 1, '  ||fx|| = %g\n', norm ( fx ) );
    end

  end

  return
end

