summaryrefslogtreecommitdiff
path: root/test/ratnest.adb
diff options
context:
space:
mode:
authorJed Barber <jjbarber@y7mail.com>2019-01-08 00:00:09 +1100
committerJed Barber <jjbarber@y7mail.com>2019-01-08 00:00:09 +1100
commit6f767eb4b27c4e15ca6c3be3b93ca187caf95bd9 (patch)
tree985ad6bb1ce2215e71fbac1281f99432eebf6c09 /test/ratnest.adb
parent809ccef242df42ab43ca0b05e48bf841f840be4b (diff)
Basic test framework and initial tests for Packrat.Util predicates
Diffstat (limited to 'test/ratnest.adb')
-rw-r--r--test/ratnest.adb34
1 files changed, 34 insertions, 0 deletions
diff --git a/test/ratnest.adb b/test/ratnest.adb
new file mode 100644
index 0000000..8d1493c
--- /dev/null
+++ b/test/ratnest.adb
@@ -0,0 +1,34 @@
+
+
+with
+
+ Ada.Text_IO;
+
+use
+
+ Ada.Text_IO;
+
+
+package body Ratnest is
+
+
+ procedure Run_Tests
+ (To_Run : in Test_Array)
+ is
+ Total_Count : Natural := To_Run'Length;
+ Failed_Count : Natural := 0;
+ begin
+ for T of To_Run loop
+ if T.Func.all = Failure then
+ Put_Line ("Failed test " & (-T.Name));
+ Failed_Count := Failed_Count + 1;
+ end if;
+ end loop;
+ Put_Line ("Test results" & Integer'Image (Total_Count - Failed_Count) &
+ " out of" & Integer'Image (Total_Count));
+ end Run_Tests;
+
+
+end Ratnest;
+
+