Class Tools.Testsuite.Test

Inheritance graph
Tools.Testsuite.Test Tools.Testsuite.M4Testsuite.M4Test
Description

Rerpesents a test in a testsuite.


Variable conditions

array(string) Tools.Testsuite.Test.conditions

Description

The list of conditions that has to be met for this test to not be skipped. Each condition should be an expression.


Variable file

string Tools.Testsuite.Test.file

Description

The file the testsuite (source) resides in.


Variable inhibit_errors

bool|object Tools.Testsuite.Test.inhibit_errors

Description

This value will be sent to MasterObject.set_inhibit_errors before compilation by compile().


Variable line

int(1..) Tools.Testsuite.Test.line

Description

The line number offset to this test in the file.


Variable number

int(1..) Tools.Testsuite.Test.number

Description

The test number in this file.


Variable source

string Tools.Testsuite.Test.source

Description

The source code that is to be compiled and evaluated.


Variable type

string Tools.Testsuite.Test.type

Description

The type of the test. Any of

"COMPILE"

Compiles the source and make verifies there are no warnings or errors.

"COMPILE_ERROR"

Compiles the source and expects to get a compilation error.

"COMPILE_WARNING"

Compiles the source and expects to get a compilation warning.

"EVAL_ERROR"

Evaluates the method a of the source source and expects an evaluation error.

"FALSE"

Verifies that the response from method a of the source is false.

"TRUE"

Verifies that the response from method a of the source is true.

"PUSH_WARNING"

Evaluate the method a and take the resulting string and push it to the set of ignored warnings. The same warning can be pushed multiple times, but must be popped multiple times.

"POP_WARNING"

Evaluate the method a and take the resulting string and pop the warning from the set of ignored warnings. When popped the same number of times as it has been pushed, the warning is no longer ignored.

"RUN"

Compiles and evaluates method a of the source, but ignores the result.

"RUNCT"

Compiles and evaluates method a od source, and expects an array(int) of two or three elements back.

Array
int 0

The number of successful tests performed.

int 1

The number of failed tests,

int 2

Optionally the number of skipped tests.

"EQ"

Compares the result of the method a and b with ==.

"EQUAL"

Compares the result of the method a and b with equal.


Method create

Tools.Testsuite.Test Tools.Testsuite.Test(string file, int line, int number, string type, string source, void|array(string) cond)