with Ada.Text_IO, Ada.Command_Line, Ada.Characters.Latin_1, Unit_Tests, Graph_Tests.Basic, Graph_Tests.Inspection, Graph_Tests.Context, Graph_Tests.Curses, Graph_Tests.Labels, Graph_Tests.Modify, Graph_Tests.Search; use Ada.Text_IO, Unit_Tests; procedure Test_Main is package Latin renames Ada.Characters.Latin_1; Help_String : String := "Runs unit tests on the Ada Directed Graph library." & Latin.LF & "Usage: graphtest [switches]" & Latin.LF & Latin.LF & "Valid switches:" & Latin.LF & "--help" & Latin.HT & Latin.HT & "Shows this information" & Latin.LF & "--verbose" & Latin.HT & "Enables extra verbosity" & Latin.LF & Latin.LF & "All other command line input will be ignored."; How_Verbose : Verbosity := Weak; begin for N in 1 .. Ada.Command_Line.Argument_Count loop if Ada.Command_Line.Argument (N) = "--help" then Put_Line (Help_String); return; end if; end loop; for N in 1 .. Ada.Command_Line.Argument_Count loop if Ada.Command_Line.Argument (N) = "--verbose" then How_Verbose := Strong; exit; end if; end loop; Put_Line ("Running basic tests..."); Run_Tests (Graph_Tests.Basic.Tests, How_Verbose); New_Line; Put_Line ("Running inspection tests..."); Run_Tests (Graph_Tests.Inspection.Tests, How_Verbose); New_Line; Put_Line ("Running context tests..."); Run_Tests (Graph_Tests.Context.Tests, How_Verbose); New_Line; Put_Line ("Running cursor tests..."); Run_Tests (Graph_Tests.Curses.Tests, How_Verbose); New_Line; Put_Line ("Running label tests..."); Run_Tests (Graph_Tests.Labels.Tests, How_Verbose); New_Line; Put_Line ("Running modify tests..."); Run_Tests (Graph_Tests.Modify.Tests, How_Verbose); New_Line; Put_Line ("Running search tests..."); Run_Tests (Graph_Tests.Search.Tests, How_Verbose); end Test_Main;