Some fundamental definitions.


§1. Build identity. This notation tangles out to the current build number as specified in the contents section of this web.

define PROGRAM_NAME "intest"
define INTEST_BUILD "intest output from tangler command 'Version Number'"

§2. Starting and stopping Foundation. Like all the other Inform tools, this one is built on top of a module of standard library routines called Foundation. When Intest starts and ends, the following are called:

void Basics::start(int argc, char **argv) {
    Foundation::start(argc, argv);
    ArchModule::start();
    Declare new memory allocation reasons2.1;
    Declare new debugging log aspects2.2;
    Declare new writers and loggers2.3;
}

void Basics::end(void) {
    Foundation::end();
}

§2.1. Simple allocations. Not all of our memory will be claimed in the form of structures: now and then we need to use the equivalent of traditional malloc and calloc routines.

enumerate TURN_STORAGE_MREASON 
enumerate COMMAND_HISTORY_MREASON 

Declare new memory allocation reasons2.1 =

    Memory::reason_name(TURN_STORAGE_MREASON, "skein turn storage");
    Memory::reason_name(COMMAND_HISTORY_MREASON, "command history storage");

§2.2. Debugging log.

enumerate VARIABLES_DA 
enumerate INSTRUCTIONS_DA 
enumerate DIFFER_DA 
enumerate HASHER_DA 
enumerate TESTER_DA 

Declare new debugging log aspects2.2 =

    Log::declare_aspect(VARIABLES_DA, U"variables", FALSE, FALSE);
    Log::declare_aspect(INSTRUCTIONS_DA, U"instructions", FALSE, FALSE);
    Log::declare_aspect(DIFFER_DA, U"differ", FALSE, FALSE);
    Log::declare_aspect(HASHER_DA, U"hasher", FALSE, FALSE);
    Log::declare_aspect(TESTER_DA, U"tester", FALSE, FALSE);

§2.3. Writers and loggers. This enables the %k and $L format notations in WRITE and LOG respectively.

Declare new writers and loggers2.3 =

    Writers::register_writer('k', &Skeins::write_node_label);
    Writers::register_logger('L', &Delia::log_line);