function r8poly_integral_test ( )

%*****************************************************************************80
%
%% r8poly_integral_test() tests r8poly_integral().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    20 October 2019
%
%  Author:
%
%    John Burkardt
%
  ntest = 1;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'r8poly_integral_test\n' );
  fprintf ( 1, '  r8poly_integral() computes the integral of a polynomial.\n' );
  fprintf ( 1, '\n' );

  for itest = 1 : ntest

    if ( itest == 1 )
      n = 1;
      c(1:n+1) = [ 3.0; -2.0 ];
      a = 0.0;
      b = 1.0;
      integral_exact = 2.0;
    end

    integral_computed = r8poly_integral ( n, c, a, b );

    r8poly_print ( c, '  The polynomial:' );

    fprintf ( 1, '  Computed integral over [%g,%g] = %g\n', a, b, integral_computed );
    fprintf ( 1, '  Correct integral  over [%g,%g] = %g\n', a, b, integral_exact );

  end

  return
end
