Test

class ReflectExport(reflect) Test : public Dynamic

Each subclass of Test implements a unit test.

See Also

  • TEST and <FIXTURE>: Macros for making tests.
Summary
TestEach subclass of Test implements a unit test.
MacrosHelper macros for generating and using TEST types.
Macros
ASSOCIATEassociates a type with a test, used to tell the test framework which types have been tested.
CHECKchecks if an expression is true.
CHECK_EQUALA specialized check for comparing values, may give slightly more interesting output compared to CHECK.
TESTDefines a new TEST,

Macros

Helper macros for generating and using TEST types.

Summary
Macros
ASSOCIATEassociates a type with a test, used to tell the test framework which types have been tested.
CHECKchecks if an expression is true.
CHECK_EQUALA specialized check for comparing values, may give slightly more interesting output compared to CHECK.
TESTDefines a new TEST,

Macros

ASSOCIATE

associates a type with a test, used to tell the test framework which types have been tested.

CHECK

checks if an expression is true.  if it isn’t the test is marked as failed and a an error message is printed.

CHECK_EQUAL

A specialized check for comparing values, may give slightly more interesting output compared to CHECK.

TEST

Defines a new TEST,

Usage

TEST(Stuff)
{
    CHECK(5 < strlen("Hello World"));
    CHECK_EQUAL(32, atoi("32"));
}
class ReflectExport(reflect) Test : public Dynamic
Each subclass of Test implements a unit test.
checks if an expression is true.
Defines a new TEST,
Close