CVS difference for acats/new/c452003.a
--- acats/new/c452003.a 2020/05/14 02:31:24 1.3
+++ acats/new/c452003.a 2020/05/16 03:52:52 1.4
@@ -55,7 +55,7 @@
-- provide that. The abstraction constructor wants to communicate that
-- the actual parameters have to have library-level accessibility - they
-- can do that with a membership in a precondition. Similarly, the client
--- avoid violated the precondition (regardless of how
+-- programmer wants to avoid violating the precondition (regardless of how
-- it is given), and they can use a membership to do that.
--
-- We only declare a skeleton of this structure, declaring Root_Type and
@@ -84,6 +84,7 @@
-- 28 Sep 2018 RLB Created test.
-- 13 May 2020 RLB Corrected Force_Save, the inner if branches
-- were backwards.
+-- 14 May 2020 RLB Corrected Force_Op, which didn't test the objective.
--
--!
@@ -106,7 +107,7 @@
type TC_Result is (Is_Null, Done, Wrong_Kind);
- procedure Force_Op (Obj : access Root_Type'Class;
+ procedure Force_Op (Obj : access constant Root_Type'Class;
Result : out TC_Result);
end C452003_Root;
@@ -139,16 +140,16 @@
end if;
end Is_Present;
- type Any_Cnst_Root_Ptr is access constant Root_Type'Class;
-
- procedure Force_Op (Obj : access Root_Type'Class;
+ procedure Force_Op (Obj : access constant Root_Type'Class;
Result : out TC_Result) is
begin
- if Obj in Any_Cnst_Root_Ptr then -- (Objective 1)
+ if Obj in Any_Root_Ptr then -- (Objective 1)
if Obj in Non_Null_Any_Root_Ptr then -- Should never get here.
- Result := Is_Null;
- else
Result := Done;
+ Global_Save := Any_Root_Ptr (Obj);
+ else
+ Result := Is_Null;
+ Global_Save := null;
end if;
else
Result := Wrong_Kind;
Questions? Ask the ACAA Technical Agent