function perm_parity_test ( )

%*****************************************************************************80
%
%% perm_parity_test() tests perm_parity().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    26 December 2015
%
%  Author:
%
%    John Burkardt
%
  n = 5;

  fprintf ( 1, ' \n' );
  fprintf ( 1, 'perm_parity_test():\n' );
  fprintf ( 1, '  perm_parity() computes the parity of a permutation,\n' );

  n = 5;

  for test = 1 : 5
    p = perm_random ( n );
    perm_print ( n, p, '  The permutation P:' );
    parity = perm_parity ( n, p );
    fprintf ( 1, '\n' );
    fprintf ( 1, '  The parity is %d\n', parity );
  end

  return
end
