function r8vec_is_ascending_test ( )

%*****************************************************************************80
%
%% r8vec_is_ascending_test() tests r8vec_is_ascending().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    02 August 2018
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'R8VEC_IS_ASCENDING_TEST\n' );
  fprintf ( 1, '  R8VEC_IS_ASCENDING is TRUE if an R8VEC is ascending.\n' );;
 
  n = 3;
  r8_lo = -5.0;
  r8_hi = +5.0;

  for i = 1 : 5
    a = r8_lo + ( r8_hi - r8_lo ) * rand ( n, 1 );
    label = sprintf ( '  Vector #%d', i );
    fprintf ( 1, '\n' );
    r8vec_transpose_print ( n, a, label );
    value = r8vec_is_ascending ( n, a );
    fprintf ( 1, '  r8vec_is_ascending() = %d\n', value );
  end

  return
end
