function boundary_is_legal_test ( )

%*****************************************************************************80
%
%% boundary_is_legal_test() tests boundary_is_legal().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    05 November 2020
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'boundary_is_legal_test():\n' );
  fprintf ( 1, '  boundary_is_legal() checks whether a polyiamond\n' );
  fprintf ( 1, '  boundary word is legal.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Index     Name     Boundary   Legal\n' );
  fprintf ( 1, '\n' );

  for k = 1 : 12
    [ w, p ] = boundary_hexiamond ( k );
    name = name_hexiamond ( k );
    legal = boundary_is_legal ( w, p );
    tf = boolean_to_string ( legal );
    fprintf ( 1, '  %2d  %10s  %10s    %s\n', k, name, ['"', w, '"'], tf );
  end

  return
end

