function jed_is_legal_test ( )

%*****************************************************************************80
%
%% JED_IS_LEGAL_TEST() tests JED_IS_LEGAL.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    10 December 2017
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'JED_IS_LEGAL_TEST:\n' );
  fprintf ( 1, '  JED_IS_LEGAL reports whether JED is a legal value.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '        JED     JED_IS_LEGAL\n' );
  fprintf ( 1, '\n' );

  jed_values = [ -100, -1, 0, 1, 1.5, 50000 ];

  jed_num = length ( jed_values );

  for i = 1 : jed_num

    jed = jed_values(i);
    legal = jed_is_legal ( jed );

    if ( legal )
      fprintf ( 1, '  %12f  True\n', jed );
    else
      fprintf ( 1, '  %12f  False\n', jed );
    end

  end

  return
end
