function rat_add_test ( )

%*****************************************************************************80
%
%% rat_add_test() tests rat_add().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    13 April 2009
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'rat_add_test():\n' );
  fprintf ( 1, '  rat_add() adds two rationals.\n' );

  atop = 3;
  abot = 4;
  btop = 10;
  bbot = 7;

  [ ctop, cbot ] = rat_add ( atop, abot, btop, bbot );

  fprintf ( 1, '\n' );
  s = rat_to_s ( atop, abot );
  fprintf ( 1, '  A = %s\n', s );
  s = rat_to_s ( btop, bbot );
  fprintf ( 1, '  B = %s\n', s );
  s = rat_to_s ( ctop, cbot );
  fprintf ( 1, '  C = A + B = %s\n', s );

  return
end
