[Ada] Fix integer-vs-float errors in example for Test_Case pragma
authorPiotr Trojanek <trojanek@adacore.com>
Fri, 27 Nov 2020 14:01:27 +0000 (15:01 +0100)
committerPierre-Marie de Rodat <derodat@adacore.com>
Wed, 16 Dec 2020 13:01:01 +0000 (08:01 -0500)
gcc/ada/

* doc/gnat_rm/implementation_defined_pragmas.rst
(Test_Case): Change integer to float literals.
* gnat_rm.texi: Regenerate.

gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst
gcc/ada/gnat_rm.texi

index f8a62a5..74b9718 100644 (file)
@@ -6652,8 +6652,8 @@ expression. The following is an example of use within a package spec:
      function Sqrt (Arg : Float) return Float;
      pragma Test_Case (Name     => "Test 1",
                        Mode     => Nominal,
-                       Requires => Arg < 10000,
-                       Ensures  => Sqrt'Result < 10);
+                       Requires => Arg < 10000.0,
+                       Ensures  => Sqrt'Result < 10.0);
      ...
   end Math_Functions;
 
index 401d625..02e8219 100644 (file)
@@ -21,7 +21,7 @@
 
 @copying
 @quotation
-GNAT Reference Manual , Nov 20, 2020
+GNAT Reference Manual , Dec 11, 2020
 
 AdaCore
 
@@ -8159,8 +8159,8 @@ package Math_Functions is
    function Sqrt (Arg : Float) return Float;
    pragma Test_Case (Name     => "Test 1",
                      Mode     => Nominal,
-                     Requires => Arg < 10000,
-                     Ensures  => Sqrt'Result < 10);
+                     Requires => Arg < 10000.0,
+                     Ensures  => Sqrt'Result < 10.0);
    ...
 end Math_Functions;
 @end example