From e923786545e16425bf95b2a66036be1f22467076 Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Tue, 19 May 2020 21:24:41 +1000 Subject: Exceptions from supplied testing functions now caught as test fails --- src/unit_tests.adb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/unit_tests.adb b/src/unit_tests.adb index 452721e..97ce570 100644 --- a/src/unit_tests.adb +++ b/src/unit_tests.adb @@ -25,7 +25,11 @@ package body Unit_Tests is if Verbose = Strong then Put ("Running test " & (-To_Run.Name) & "..."); end if; - Result := To_Run.Func.all; + begin + Result := To_Run.Func.all; + exception + when others => Result := Fail; + end; if Verbose = Strong then if Result = Pass then Put_Line (" Pass"); -- cgit