TestCore Class Reference

Core for developer tests. More...

#include <testcore.h>

+ Inheritance diagram for TestCore:

Public Member Functions

void clearCounters ()
 Clears success/fail counters. More...
void executeTest (TestUnitBase *pTest)
int numTests () const
int numTestsFailed () const
int numTestsSucceeded () const

Protected Attributes

int testsFailed
int testsSucceeded

Additional Inherited Members

- Static Protected Attributes inherited from TestBase
static Log testLog

Detailed Description

Core for developer tests.

IMPORTANT NOTICE: The whole "tests" package is designed for developer use only. It is NOT performed in enclosed environment and may cause damage to the application's setup if used inappropriately.

Tests package imitates the Java's JUnit behavior. The design is much simplier and the only supported outputs are the Log class (which prints to stdout) and stdout itself. The test results are simple boolean values: false if test failed at some point or true if succeeded.

TestBase root class provides a static instance of Log class: testLog. This instance should be used to display output.

All tests should be executed through executeTest() method. This will print standard information before and after each test.

Definition at line 48 of file testcore.h.

Member Function Documentation

void TestCore::clearCounters ( )

Clears success/fail counters.

Definition at line 31 of file testcore.cpp.

void TestCore::executeTest ( TestUnitBase pTest)

Provides a standard encapsulation for test execution.

test- An instance of TestUnitBase derivative class. Important: this object will be deleted by this method

Definition at line 37 of file testcore.cpp.

The documentation for this class was generated from the following files: