-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
Consider:
function Say_Hello (Name : String) return String
with
Post => Say_Hello'Result in "hello",
Test_Case => (Name => "Test_Say_Hello",
Mode => Nominal);The 'Result in the postcondition leads to invalid Ada code in read only section:
function Wrap_Test_Say_Hello_7265c2_737355 (Name : String) return String
is
begin
declare
Test_Say_Hello_7265c2_737355_Result : constant String := GNATtest_Generated.GNATtest_Standard.DUT.Say_Hello (Name);
begin
begin
pragma Assert
(Say_Hello'Result in "hello");
null;
exception
when System.Assertions.Assert_Failure =>
AUnit.Assertions.Assert
(False,
"ens_sloc(dut.ads:0:):Test_Say_Hello test commitment violated");
end;
return Test_Say_Hello_7265c2_737355_Result;
end;
end Wrap_Test_Say_Hello_7265c2_737355;With:
dut-test_data-tests.adb:40:16: error: attribute "RESULT" can only appear in postcondition of functionReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels