-- Do not modify this file! -- This package contains utility routines which are useful for -- writing test programs. with ada.exceptions; package testing is procedure comment (msg : string); -- Call this to print out a an informational message, -- iff Verbose = True. -- It does not imply that anything went wrong. procedure done; -- Call this once, before exiting, when the testing is complete, -- for normal completion. procedure except (message : string := ""); -- Call this after a call which is supposed to raise an -- exception. In other words, it should be called from a -- location that can only be reached if an expected exception -- did NOT occur. procedure fail (message : string := ""); -- Call this to record the fact that a test failed. procedure fail (e : ada.exceptions.exception_occurrence; message : string := ""); -- Call this from an exception handler for "others", to catch -- completion of test case by an unhandled exception. procedure fatal_exception (e : ada.exceptions.exception_occurrence); -- Call this from an exception handler for "others", to catch -- completion of test program by an unhandled exception. procedure header (name : string); -- Call this once for each test program, at the beginning. -- It prints a message indicating that a test is about to be -- performed, regardless of whether verbose is turned on. procedure set_error_limit (limit : natural := 20); -- Call this to override the default limit on the number of -- errors before the test is aborted. procedure require (condition : boolean; message : string := ""); -- Call this to check a condition that should be true. -- The test fails if the argument is false. procedure test (name : string); -- Call this once for each section of the test program. -- It prints a message indicating that a test is about to be -- performed, if verbose is turned on. -- The name of the test section should be unique so that if -- the test fails it is possible to find the location of the -- failure. end testing;