function triangle_ijk_order_test ( )

%*****************************************************************************80
%
%% triangle_ijk_order_test tests triangle_ijk_order().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    11 November 2020
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'triangle_ijk_order_test\n' );
  fprintf ( 1, '  triangle_ijk_order() finds the occurrence of a given \n' );
  fprintf ( 1, '  ijk triangle in a triangle list.\n' );

  t = triangle_gort ( );
  triangle_print ( t, 'Gort triangle list:' );
  tn = size ( t, 1 );

  fprintf ( 1, '\n' );
  fprintf ( 1, '    IJK        Row Order\n' );
  fprintf ( 1, '\n' );
  for test = 1 : 10
    i = randi ( [ 1, tn ], 1 );
    ijk = t(i,1:3);
    order = triangle_ijk_order ( t, ijk );
    fprintf ( 1, '  (%2d,%2d,%2d)    %2d    %2d\n', ijk, i, order );
  end

  i = 0;
  ijk = [ 1, 5, 0 ];
  order = triangle_ijk_order ( t, ijk );
  fprintf ( 1, '  (%2d,%2d,%2d)    %2d    %2d\n', ijk, i, order );
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'triangle_ijk_order_test\n' );
  fprintf ( 1, '  Normal end of execution.\n' );

  return
end

