function boundary_sort_test ( )

%*****************************************************************************80
%
%% boundary_sort_test() tests boundary_sort().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    01 July 2021
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'boundary_sort_test():\n' );
  fprintf ( 1, '  MATLAB/Octave version %s\n', version ( ) );
  fprintf ( 1, '  boundary_sort() is given a boundary word and base point\n' );
  fprintf ( 1, '  and "rotates" it to have lexically smallest base point.\n' );

  for k = 1 : 7
    name = tetrahex_name ( k );

    [ w, p ] = tetrahex_word ( k );
    name1 = [ '  ', name ];
    boundary_print ( w, p, name1 );

    [ w2, p2 ] = boundary_sort ( w, p );
    name2 = [ '  ', name, ' after sorting:' ];
    boundary_print ( w2, p2, name2 );

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

  return
end

