function pord_check_test ( )

%*****************************************************************************80
%
%% pord_check_test() tests pord_check().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    30 May 2015
%
%  Author:
%
%    John Burkardt
%
  n = 10;

  a = [ ...
    1, 0, 0, 0, 0, 0, 0, 0, 0, 0; ...
    0, 1, 0, 1, 0, 1, 0, 1, 0, 0; ...
    1, 0, 1, 1, 0, 0, 0, 0, 0, 0; ...
    0, 0, 0, 1, 0, 0, 0, 0, 0, 0; ...
    1, 1, 1, 1, 1, 1, 1, 1, 0, 1; ...
    0, 0, 0, 1, 0, 1, 0, 1, 0, 0; ...
    1, 0, 1, 1, 0, 1, 1, 1, 0, 1; ...
    0, 0, 0, 1, 0, 0, 0, 1, 0, 0; ...
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0; ...
    1, 0, 1, 1, 0, 0, 0, 1, 0, 1];

  fprintf ( 1, '\n' );
  fprintf ( 1, 'pord_check_test():\n' );
  fprintf ( 1, '  pord_check() checks a partial ordering.\n' );

  i4mat_print ( n, n, a, '  The partial ordering matrix:' );
 
  ierror = pord_check ( n, a );
 
  fprintf ( 1, '\n' );
  fprintf ( 1, '  CHECK FLAG = %d\n', ierror );
  fprintf ( 1, '  0 means no error.\n' );
  fprintf ( 1, '  1 means illegal value of N.\n' );
  fprintf ( 1, '  2 means some A(I,J) and A(J,I) are both nonzero.\n' );

  return
end
