function chinese_check_test ( )

%*****************************************************************************80
%
%% CHINESE_CHECK_TEST tests CHINESE_CHECK.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    25 May 2015
%
%  Author:
%
%    John Burkardt
%
  n = 4;
  m1 = [ 1, 3,  8, 25 ];
  m2 = [ 1, 3, -8, 25 ];
  m3 = [ 1, 3,  1, 25 ];
  m4 = [ 1, 3,  8, 24 ];

  fprintf ( 1, '\n' );
  fprintf ( 1, 'CHINESE_CHECK_TEST\n' );
  fprintf ( 1, '  CHINESE_CHECK checks a set of moduluses for use with\n' );
  fprintf ( 1, '  the Chinese Remainder representation.\n' );

  i4vec_print ( n, m1, '  Modulus set #1:' );
  ierror = chinese_check ( n, m1 );
  fprintf ( 1, '  IERROR = %d\n', ierror );

  i4vec_print ( n, m2, '  Modulus set #2:' );
  ierror = chinese_check ( n, m2 );
  fprintf ( 1, '  IERROR = %d\n', ierror );

  i4vec_print ( n, m3, '  Modulus set #3:' );
  ierror = chinese_check ( n, m3 );
  fprintf ( 1, '  IERROR = %d\n', ierror );

  i4vec_print ( n, m4, '  Modulus set #4:' );
  ierror = chinese_check ( n, m4 );
  fprintf ( 1, '  IERROR = %d\n', ierror );

  return
end
