function grid_test ( )

%*****************************************************************************80
%
%% GRID_TEST tests GRID.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    24 January 2019
%
%  Author:
%
%    John Burkardt
%
  addpath ( '../grid' );

  timestamp ( );
  fprintf ( 1, '\n' );
  fprintf ( 1, 'GRID_TEST:\n' );
  fprintf ( 1, '  MATLAB version\n' );
  fprintf ( 1, '  Test GRID.\n' );

  center = 1;
  seed = 123456789;

  grid_generate_test ( center, seed );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Repeat with a different seed from the first run.\n' );

  seed = 987654321;
  grid_generate_test  ( center, seed );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Repeat with the same seed as the first run.\n' );

  seed = 123456789;
  grid_generate_test  ( center, seed );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Repeat with different centering values.\n' );

  for center = 1 : 5

    seed = 123456789;
    grid_generate_test  ( center, seed );

  end

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

  rmpath ( '../grid' );

  return
end

