Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.
Like any testing framework, some boilerplate must exist. This is, simply, setting up the test suite, and getting the final results.
In an effort to be as easy to use as possible, initialization is nothing more than a call to
Start. This procedure always accepts the unit name to print to the log, and the log location which is standard output by default. There are other optional parameters, such as a type name if a specific type within a package is being tested.
Similarly but even simpler, the entire test suite is finalized with a call to
Stop. There are no arguments. Just make sure you actually call this.
Unlike most JUnit based frameworks, assertions here are done through question-like procedures. For example, equality isn't
Assert(1, X), it's
Is_Equal(X, 1). For Standard types, the relevant of:
Is_Greater_Or_Equal are defined.
Also unusual to many, is the concept of procedure testing. In the majority of testing frameworks, tests of functions or methods is all that is possible, because the tests are done against the returned value. Procedures and some Methods (those that return void) have no returned value, and so testing those is not very possible, right? Nope. While we can't provide them in any generic way, procedure assertions are implemented as child packages along with any other Extensions. There are two relevant choices
Fails. The parameter syntax is almost entirely dependent on what is being called, and involves procedure access calls, so it is not for novice programmers. Many procedure assertions also include a
Dump parameter, which specifies whether to include, in text form, the major type the procedure is operating upon, after the procedure call; this is obviously extremely useful for testing things like containers, where you can see the aft of the operation.
While still an important part of software testing, code timers are generally not included in testing frameworks. That's not the case here. A base
Timer exists in abstract form, with two instances:
Execution_Timer which measure their respective times. These provide
Stop calls just like a stop watch would use, as well as
Run_Time which gets how long the timer ran for as the Standard Duration type.