summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJed Barber <jjbarber@y7mail.com>2020-05-19 21:24:41 +1000
committerJed Barber <jjbarber@y7mail.com>2020-05-19 21:24:41 +1000
commite923786545e16425bf95b2a66036be1f22467076 (patch)
tree36c17e545731004fd0583520ffa87db4298cecf4
parent9fee20db966941dfe8864243c1da288cae329b4b (diff)
Exceptions from supplied testing functions now caught as test fails
-rw-r--r--src/unit_tests.adb6
1 files changed, 5 insertions, 1 deletions
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");