Assert (gb.test)

This module extends the Assert instruction, which checks that Expression is TRUE, and if the Expression is FALSE, an uncatchable "Assertion failed" error is raised, the PRINT or ERROR instruction is executed, and the program stops immediately.

Cette classe est statique.

Méthodes statiques
Approximate   Asserts that _Got_ has an absolute error to _Expected_ of at most _Precision_.
Equals   Assert that Got = Expected
Error   Assert that an error happened. Reports not ok if no error happened.
ErrorCode   Assert that an error happened with error code. Reports not ok if no error happend or if the error code is wrong.
Fail   Assert fail. Reports not ok.
Greater   Assert that Got > Bound
GreaterEqual   Assert that Got >= Bound
IsType   Assert that Got is of the type Type
Less   Assert that Got < Bound
LessEqual   Assert that Got <= Bound
Like   Assert that Got Like Pattern. See also the Like string operator.
Match   Assert that Got Match Pattern. See also the Match string operator.
NotNull   Assert that Got <> Null
NotOk   Assert that Result = False.
Notequals   Assert that Got <> Expected
Noterror   Assert that no error happened.
Null   Assert that Got = Null
Ok   Assert that Result = True
Pass   Assert that a test is passed. Reports Ok
RelativeApproximate   Asserts that _Got_ has a relative error to _Expected_ of at most _RelPrecision_.
StringEquals   Assert that Got = Expected. On failure reports hints about the difference.