From 6f767eb4b27c4e15ca6c3be3b93ca187caf95bd9 Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Tue, 8 Jan 2019 00:00:09 +1100 Subject: Basic test framework and initial tests for Packrat.Util predicates --- test/ratnest.ads | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 test/ratnest.ads (limited to 'test/ratnest.ads') diff --git a/test/ratnest.ads b/test/ratnest.ads new file mode 100644 index 0000000..adf2369 --- /dev/null +++ b/test/ratnest.ads @@ -0,0 +1,47 @@ + + +with + + Ada.Strings.Unbounded; + + +package Ratnest is + + + type Test_Result is (Failure, Success); + + type Test_Function is access function return Test_Result; + + type Test is record + Name : Ada.Strings.Unbounded.Unbounded_String; + Func : Test_Function; + end record; + + type Test_Array is array (Positive range <>) of Test; + + + + + procedure Run_Tests + (To_Run : in Test_Array); + + + + + function "+" + (S : in String) + return Ada.Strings.Unbounded.Unbounded_String + renames Ada.Strings.Unbounded.To_Unbounded_String; + + function "-" + (US : in Ada.Strings.Unbounded.Unbounded_String) + return String + renames Ada.Strings.Unbounded.To_String; + + +private + + +end Ratnest; + + -- cgit