function boundary_word_is_legal_test ( )

%*****************************************************************************80
%
%% boundary_word_is_legal_test tests boundary_word_is_legal().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    07 September 2020
%
%  Author:
%
%    John Burkardt
%
  timestamp ( );
  fprintf ( 1, '\n' );
  fprintf ( 1, 'boundary_word_is_legal_test\n' );
  fprintf ( 1, '  MATLAB/Octave version %s\n', version ( ) );
  fprintf ( 1, '  boundary_word_is_legal() checks whether a polyiamond\n' );
  fprintf ( 1, '  boundary word is legal.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Index     Name       Word     Legal\n' );
  fprintf ( 1, '\n' );

  for k = 1 : 12
    name = hexiamond_name ( k );
    word = hexiamond_boundary_word ( k );
    legal = boundary_word_is_legal ( word );
    tf = boolean_to_string ( legal );
    fprintf ( 1, '  %2d  %10s  %10s    %s\n', k, name, ['"', word, '"'], tf );
  end
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'boundary_word_is_legal_test\n' );
  fprintf ( 1, '  Normal end of execution.\n' );
  timestamp ( );

  return
end
