Test class | debug.t[775]

Based upon the Test object in the TADS library, this overhauls it to actually work and provide needed functionality for actually ASSERTing if something is correct Moreover, the Test did not work and had issues with "leftovers" where each subsequent test depended upon the results of the previous test!

Test 'foo' ['x me', 'i', 'wear uniform'] [uniform] @location;

Would cause the uniform to be moved into the player character's inventory and then the commands X ME and then I and WEAR UNIFORM to be executed in response to TEST FOO. Both the location and the inventory entries are optional

`class Test : object`

Superclass Tree (in declaration order)

`Test`
`object`

Subclass Tree

(none)

Global Objects

(none)

Summary of Properties

`clearAssertBufferBeforeCmd location reportHolding reportMove restartBeforeTest restoreStartStateAfterTest testHolding testList testName testOrder`

Summary of Methods

`getHolding run`

Properties

`clearAssertBufferBeforeCmd` | `debug.t[822]`

By default, we want to clear out the message buffer before each non-assert command, but you can change that for each test

`location` | `debug.t[792]`

The location to move the player character to before running the test script

`reportHolding` | `debug.t[798]`

Flag: do we want to report on what items were added to inventory? By default we do.

`reportMove` | `debug.t[804]`

Flag: Do we want to report any change of location by looking around in the new one? By default we will.

`restartBeforeTest` | `debug.t[816]`

If you need to restart the game BEFORE running the test activity and values

`restoreStartStateAfterTest` | `debug.t[810]`

Restore game to where it was before this test. The default value is nil.

`testHolding` | `debug.t[786]`

The objects to move into the player character's inventory before running the test script.

`testList` | `debug.t[780]`

The list commands to be executed when running this test.

`testName` | `debug.t[777]`

The name of this test

`testOrder` | `debug.t[963]`

The test all command will run tests in ascending order of their test order. By default we use the sourceTextOrder.

Methods

`getHolding ( )` | `debug.t[827]`

Move everything in the testHolding list into the actor's inventory

`run ( )` | `debug.t[848]`

Run this test by passing the commands into a script file to replay

Adv3Lite Library Reference Manual
Generated on 08/12/2025 from adv3Lite version 2.2.2