O2Testing

Module for code testing.

For now the code Assert function must be given sequential id numbers as the line number in files is not available.

Reference to tests/Main.ob2 for usage.

Types

TEST* =
    RECORD
        tests : LONGINT;
        failed : LONGINT;
        local : LONGINT;
        localid : LONGINT;
        localfailed : LONGINT;
    END;

Procedures

Initialize

PROCEDURE Initialize* (VAR test: TEST; file: ARRAY OF CHAR);

Begin

Begin local module tests

PROCEDURE Begin* (VAR test: TEST; file: ARRAY OF CHAR);

End

End local module tests and print out statistics

PROCEDURE End* (VAR test: TEST; file: ARRAY OF CHAR);

Finalize

Finalize tests and print out total statistics

PROCEDURE Finalize* (VAR test: TEST; file: ARRAY OF CHAR);

Assert

Assert procedure.

id should be a sequental number starting from 1.

PROCEDURE Assert* (VAR test: TEST; b: BOOLEAN; file: ARRAY OF CHAR; id: LONGINT) ;