function unicycle_index_test ( )

%*****************************************************************************80
%
%% unicycle_index_test() tests unicycle_index().
%
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    08 July 2021
%
%  Author:
%
%    John Burkardt
%
  n = 6;
  test_num = 5;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'unicycle_index_test():\n' );
  fprintf ( 1, '  unicycle_index() converts a unicycle to index form.\n' );

  for test = 1 : test_num 

    u = unicycle_random ( n );

    unicycle_print ( n, u, '  The unicycle:' );

    u_index = unicycle_index ( n, u );
    
    unicycle_index_print ( n, u_index, '  The index form:' );

    u2 = unicycle_index_to_sequence ( n, u_index );

    unicycle_print ( n, u2, '  The unicycle recovered:' );

  end

  return
end
