function pivot_sequence_check_test ( )

%*****************************************************************************80
%
%% pivot_sequence_check_test() tests pivot_sequence_check().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    25 June 2024
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'pivot_sequence_check test():\n' );
  fprintf ( 1, '  pivot_sequence_check() checks N and T.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Check?   N    T\n' );
  fprintf ( 1, '\n' );
  
  for test = 1 : 3

    n = 5;

    if ( test == 1 )
      t = [ 5, 3, 2, 2, 1 ];
    elseif ( test == 2 )
      t = [ 5, 2, 2, 3, 1 ];
    elseif ( test == 3 )
      t = [ 4, 3, 0, 2, 1 ];
    end

    check = pivot_sequence_check ( n, t );

    fprintf ( 1, '      %5s  %2d', mat2str ( check ), n );
    i4vec_transpose_print ( n, t, '' );

  end

  return
end
