function word_parity_test ( )

%*****************************************************************************80
%
%% word_parity_test() tests word_parity().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    15 June 2021
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'word_parity_test():\n' );
  fprintf ( 1, '  word_parity() takes the boundary word of an object\n' );
  fprintf ( 1, '  and computes its parity.\n' );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Index  Parity\n' );
  fprintf ( 1, '\n' );

  parity_sum = 0;

  for k = 1 : 209
    [ w, p ] = eternity_tile_word ( k );
    parity = word_parity ( w );
    if ( mod ( parity, 2 ) ~= 0 )
      flag = 'This value MUST be wrong!';
    else
      flag = '';
    end
    fprintf ( 1, '    %3d  %2d  %s\n', k, parity, flag );
  end
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'word_to_parity_test():\n' );
  fprintf ( 1, '  Normal end of execution.\n' );

  return
end

