function boundary_range_test ( )

%*****************************************************************************80
%
%% boundary_range_test() tests boundary_range().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    29 June 2021
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'boundary_range_test():\n' );
  fprintf ( 1, '  MATLAB/Octave version %s\n', version ( ) );
  fprintf ( 1, '  boundary_range() finds the minimum and maximum I and J\n' );
  fprintf ( 1, '  coordinates of a polyhex described by its boundary word W\n' );
  fprintf ( 1, '  and starting at P(i,j).\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '        Name  Imin  Imax  Jmin  Jmax  Pi  Pj  W\n' );
  fprintf ( 1, '\n' );

  for k = 1 : 7
    name = tetrahex_name ( k );
    [ w, p ] = tetrahex_word ( k );
    [ imin, imax, jmin, jmax ] = boundary_range ( w, p );
    fprintf ( 1, '  %10s  %4d  %4d  %4d  %4d  %2d  %2d  %s\n', ...
      name, imin, imax, jmin, jmax, p(1), p(2), ['"', w, '"'] );
  end
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'boundary_range_test():\n' );
  fprintf ( 1, '  Normal end of execution.\n' );

  return
end

