function collatz_polynomial_next_test ( )

%*****************************************************************************80
%
%% collatz_polynomial_next_test() tests collatz_polynomial_next().
%
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    15 September 2022
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'collatz_polynomial_next_test():\n' );
  fprintf ( 1, '  collatz_polynomial_next() returns the next polynomial\n' );
  fprintf ( 1, '  in a Collatz sequence.\n' );

  p0 = [ 1, 0, 1 ];
  p1 = collatz_polynomial_next ( p0 );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  p0(x) = ' );
  polynomial_print ( p0 );
  fprintf ( 1, '  p1(x) = ' );
  polynomial_print ( p1 );

  p0 = [ 0, 0, 1, 0, 1, 1 ];
  p1 = collatz_polynomial_next ( p0 );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  p0(x) = ' );
  polynomial_print ( p0 );
  fprintf ( 1, '  p1(x) = ' );
  polynomial_print ( p1 );

  p0 = [ 1 ];
  p1 = collatz_polynomial_next ( p0 );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  p0(x) = ' );
  polynomial_print ( p0 );
  fprintf ( 1, '  p1(x) = ' );
  polynomial_print ( p1 );

  return
end
