CVS difference for acats/new/c611a020.a

Differences between 1.1 and version 1.2
Log of other versions for file acats/new/c611a020.a

--- acats/new/c611a020.a	2016/03/31 07:45:22	1.1
+++ acats/new/c611a020.a	2016/04/01 03:12:40	1.2
@@ -69,11 +69,13 @@
 --        C611A022.AM
 --
 -- CHANGE HISTORY:
---  Initial pre-release version.
---  Renamed so all test parts have same first 7
---  characters.
---  Split all of the specific type objectives into
---  a single test.
+--     21 Mar 16   JAC    Initial pre-release version.
+--     24 Mar 16   RLB    Renamed so all test parts have same first 7
+--                        characters.
+--     30 Mar 16   RLB    Split all of the specific type objectives into
+--                        a single test.
+--     31 Mar 16   RLB    Removed duplicative suffixes.
+--
 --!
 with F611A00;
 
@@ -85,30 +87,30 @@
 
    function  Distance             (O : in     Object) return Float
     with Pre        => F611A00.TC_Log_Object_Distance_Specific_Pre_Called
-                       and then X_Coord_S (O) <= 10.0,
+                       and then X_Coord (O) <= 10.0,
          Post       => F611A00.TC_Log_Object_Distance_Specific_Post_Called
-                       and then Distance_Is_Positive_S (O);
+                       and then Distance_Is_Positive (O);
 
    procedure Move                   (O : in out Object'Class;
                                      X : in     Float;
                                      Y : in     Float);
 
-   function  X_Coord_S              (O : in     Object) return Float
+   function  X_Coord                (O : in     Object) return Float
     with Pre        => F611A00.TC_Log_Object_X_Coord_Specific_Pre_Called,
          Post       => F611A00.TC_Log_Object_X_Coord_Specific_Post_Called
-                       and then X_Coord_S'Result /= 0.0; -- No longer at default
+                       and then X_Coord'Result /= 0.0; -- No longer at default
 
-   function  Y_Coord_S              (O : in     Object) return Float
+   function  Y_Coord                (O : in     Object) return Float
     with Pre        => F611A00.TC_Log_Object_Y_Coord_Specific_Pre_Called,
          Post       => F611A00.TC_Log_Object_Y_Coord_Specific_Post_Called
-                       and then Y_Coord_S'Result /= 0.0; -- No longer at default
+                       and then Y_Coord'Result /= 0.0; -- No longer at default
 
    -- Postcondition functions
-   function  Distance_Is_Positive_S (O : in     Object) return Boolean;
+   function  Distance_Is_Positive (O : in     Object) return Boolean;
 
-   function  Not_Too_Far            (O : in     Object) return Boolean;
+   function  Not_Too_Far          (O : in     Object) return Boolean;
 
-   function  Not_Too_Near           (O : in     Object) return Boolean;
+   function  Not_Too_Near         (O : in     Object) return Boolean;
 
 private
 
@@ -125,8 +127,10 @@
 package body C611A020 is
 
    function Local_Distance (O : in Object) return Float is
-     (Ada.Numerics.Elementary_Functions.Sqrt
-        (O.X_Coord ** 2 + O.Y_Coord ** 2));
+      -- Simulate a bug in the distance routine that fails the postcondition:
+      (if O.Y_Coord = -0.25 then -1.0
+       else Ada.Numerics.Elementary_Functions.Sqrt
+                  (O.X_Coord ** 2 + O.Y_Coord ** 2));
 
    function Distance (O : in Object) return Float is
    begin
@@ -139,12 +143,7 @@
 
       F611A00.TC_Object_Distance_Called := True;
 
-      -- Simulate a bug in the object routine that fails the postcondition:
-      if O.Y_Coord = -0.25 then
-         return -1.0;
-      else
-         return Local_Distance (O);
-      end if;
+      return Local_Distance (O);
    end Distance;
 
    procedure Move (O : in out Object'Class;
@@ -155,27 +154,27 @@
       O.Y_Coord := Y;
    end Move;
 
-   function X_Coord_S (O : in Object) return Float is
+   function X_Coord (O : in Object) return Float is
    begin
-      F611A00.TC_Object_X_Coord_S_Called := True;
+      F611A00.TC_Object_X_Coord_Called := True;
 
       return O.X_Coord;
-   end X_Coord_S;
+   end X_Coord;
 
-   function Y_Coord_S (O : in Object) return Float is
+   function Y_Coord (O : in Object) return Float is
    begin
-      F611A00.TC_Object_Y_Coord_S_Called := True;
+      F611A00.TC_Object_Y_Coord_Called := True;
 
       return O.Y_Coord;
-   end Y_Coord_S;
+   end Y_Coord;
 
    -- Postcondition functions
-   function Distance_Is_Positive_S (O : in Object) return Boolean is
+   function Distance_Is_Positive (O : in Object) return Boolean is
    begin
-      F611A00.TC_Object_Distance_Is_Positive_S_Called := True;
+      F611A00.TC_Object_Distance_Is_Positive_Called := True;
 
       return Local_Distance (O) >= 0.0;
-   end Distance_Is_Positive_S;
+   end Distance_Is_Positive;
 
    function Not_Too_Far (O : in Object) return Boolean is
    begin

Questions? Ask the ACAA Technical Agent