with Ada.Text_IO, Ada.Command_Line, Ada.Characters.Latin_1, Unit_Tests, Graph_Tests.Basic; 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 construction and inspection tests..."); Run_Tests (Graph_Tests.Basic.Tests, How_Verbose); -- New_Line; end Test_Main;