function polyomino_parity_test ( )

%*****************************************************************************80
%
%% polyomino_parity_test tests polyomino_parity.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    03 April 2020
%
%  Author:
%
%    John Burkardt
%
  timestamp ( );
  fprintf ( 1, '\n' );
  fprintf ( 1, 'polyomino_parity_test:\n' );
  fprintf ( 1, '  polyomino_parity returns the parity of a polyomino.\n' );

  for i = 1 : 5

    ns = randi( [ 1, 20 ] );
    ps = polyomino_random ( ns );
    p = polyomino_sparse_to_full ( ps );
    [ m, n ] = size ( p );
    label = sprintf ( ...
      '  Random polyomino of %d squares on %d by %d grid', ns, m, n );
    polyomino_print ( m, n, p, label );
    parity = polyomino_parity ( p );
    fprintf ( 1, '\n' );
    fprintf ( 1, '  parity is %d\n', parity );

  end
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'polyomino_parity_test:\n' );
  fprintf ( 1, '  Normal end of execution.\n' );
  timestamp ( );

  return
end

