/* ---------------------------------------------------------------------- */ /* * Version 1. */ Initial release. /* ---------------------------------------------------------------------- */ /* * Version 2. */ The extension has been rewritten. Although the functionality is mostly the same, it should integrate better with the adv3 library. Note that it now requires a TADS 3 version of 3.0.10 or later. The methods of the hypoTester object have been replaced with equivalent functions. A new function, hypoTest(), has been added, which returns true only if an action passes both verify() and check(). Another new function, getHypoVerifyResults(), can be used to get the actual results from verifying an action, in case more detailed information than just the allowed/disallowed status is needed. /* ---------------------------------------------------------------------- */ /* * Version 3. */ A new function, hypoWhatIf(), has been added. This actually executes the given action. It then evaluates a callback function before using undo to take everything back again. Please read the manual before using this. There is now a new type of verification result, called hypoIllogical, which allows an action when executed normally but rejects it during a call to hypoVerify(). The output blocking during calls to check() was broken in version 2. Reports generated with the reportFailure() macro were caught, but not any text that was printed straight out. This has now been corrected. /* ---------------------------------------------------------------------- */ /* * Version 4. */ The function previously called hypoTest() has been renamed to hypoVerifyCheck(). Instead, hypoTest() is the name of a new function, which executes one or more actions and returns true if all of them succeeded or nil if any one them failed, as signaled by a failure report. Like hypoWhatIf(), this function uses undo to take everything back after completing the test. Another new function, isHypoActionAchieved(), can determine if action has already been achieved by verifying it and looking for an illogicalAlready verify result. Both hypoWhatIf() and hypoUndoTest() can optionally be passed several actions to be executed in sequence. Each action specification should be wrapped in a list. The getHypoVerifyResults() function can no longer return nil. Where it used to return nil, it now returns an empty VerifyResultList instead. Due to an oversight, evaluating a TIAction with hypoVerify() or hypoCheck() caused a run-time error. This has been corrected.