artefaktur
software engineer &        architecture

 
 
 
 

acdkaunit

Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   Namespace Members   Compound Members   Related Pages  

Classes, functions, macros for the ACDK unit test framework


Detailed Description

See also:
 ACDK Unit Tests


Namespaces

namespace  acdk::tools::aunit
 unit-test framework


Compounds

class  CfgScriptTestCase
 execute one CfgScript script as test case. More...

class  CfgScriptTestSuite
 execute all CfgScripts in a given directory - including sub directories if recursive is true - which ends with _Test.csf More...

class  TestCase
 A single test case. More...

class  TestConsoleListener
 Listen to test and prints to console. More...

class  TestDebuggerListener
 Listen to test and prints to console. More...

class  TestException
 This exception is used to indicate failed tests. More...

class  TestFailure
 represents a failure More...

class  TestHtmlReport
 Writes an Report after running the tests. More...

class  TestListener
 Listen to a executing test. More...

class  TestReport
 Writes an Report after running the tests. More...

class  TestResult
 represents a result of a test More...

class  TestResultEntry
 holds results of one Test More...

class  TestSuite
 A TestSuite is a collection of TestCases. More...

class  TestTextReport
 Writes an text Report after running the tests. More...


Defines

#define BEGIN_DECLARE_TEST(ClassName)
 used to define C++ unit test.

#define DECLARE_TEST(methodName)   void methodName();
 used to define C++ unit test.

#define END_DECLARE_TEST(ClassName)   };
 used to define C++ unit test.

#define AUTOEXEC_TEST_SUITE(className)   static ::acdk::tools::aunit::TestRunnerStaticAdder t( new className(#className) );
 used to define C++ unit test.

#define BEGIN_DEFINE_TEST(ClassName)
 used to define C++ unit test.

#define END_DEFINE_TEST(ClassName)
 used to define C++ unit test.

#define ADD_TEST(ClassName, methodName)
 used to define C++ unit test.

#define ACDK_TEST_MAIN
 used to define C++ unit test.

#define testAssert(condition)   ::acdk::tools::aunit::TestCase::activeTest->assertImplementation ((condition),(#condition), __LINE__, __FILE__)
 Test a test condition.

#define testAssertUc(condition)   ::acdk::tools::aunit::TestCase::activeTest->assertImplementation ((condition),RString((_US(#condition))), __LINE__, __FILE__)
 Test a test condition.

#define testAssertComment(condition, comment)   ::acdk::tools::aunit::TestCase::activeTest->assertImplementation ((condition),(comment), __LINE__, __FILE__)
 Test a test condition.


Define Documentation

#define ACDK_TEST_MAIN
 

Value:

int main(int argc, char* argv[], char** envptr) \
{ \
   return acdk::lang::System::main(::acdk::tools::aunit::TestRunner::testmain, argc, argv, envptr); \
}
used to define C++ unit test.

See also:
 ACDK Unit Tests

#define ADD_TEST ClassName,
methodName   ) 
 

Value:

testSuite->addTest ( \
      new ::acdk::tools::aunit::TestCaller < ClassName >( \
          #ClassName . #methodName ,  \
         (::acdk::tools::aunit::TestCaller< ClassName > ::TestMethod)&ClassName::methodName ));
used to define C++ unit test.

See also:
 ACDK Unit Tests

#define AUTOEXEC_TEST_SUITE className   )     static ::acdk::tools::aunit::TestRunnerStaticAdder t( new className(#className) );
 

used to define C++ unit test.

See also:
 ACDK Unit Tests

#define BEGIN_DECLARE_TEST ClassName   ) 
 

Value:

class ClassName \
   : public ::acdk::tools::aunit::TestSuite \
{   \
public: \
  virtual ::acdk::tools::aunit::RTest suite(); \
  ClassName(IN(RString) name) \
  : ::acdk::tools::aunit::TestSuite(name) \
  {\
  }
used to define C++ unit test.

See also:
 ACDK Unit Tests

#define BEGIN_DEFINE_TEST ClassName   ) 
 

Value:

AUTOEXEC_TEST_SUITE(ClassName) \
   ::acdk::tools::aunit::RTest ClassName::suite()\
      { \
         ::acdk::tools::aunit::RTestSuite testSuite = new ::acdk::tools::aunit::TestSuite(name());
used to define C++ unit test.

See also:
 ACDK Unit Tests

#define DECLARE_TEST methodName   )     void methodName();
 

used to define C++ unit test.

See also:
 ACDK Unit Tests

#define END_DECLARE_TEST ClassName   )     };
 

used to define C++ unit test.

See also:
 ACDK Unit Tests

#define END_DEFINE_TEST ClassName   ) 
 

Value:

return (::acdk::tools::aunit::RTest)testSuite; \
   }
used to define C++ unit test.

See also:
 ACDK Unit Tests

#define testAssert condition   )     ::acdk::tools::aunit::TestCase::activeTest->assertImplementation ((condition),(#condition), __LINE__, __FILE__)
 

Test a test condition.

Will throw a TestException if condition is false

Parameters:
condition any C++ expression containing only ASCII letters

#define testAssertComment condition,
comment   )     ::acdk::tools::aunit::TestCase::activeTest->assertImplementation ((condition),(comment), __LINE__, __FILE__)
 

Test a test condition.

Will throw a TestException if condition is false

Parameters:
condition any C++ expression
comment String containing a comment to this test

#define testAssertUc condition   )     ::acdk::tools::aunit::TestCase::activeTest->assertImplementation ((condition),RString((_US(#condition))), __LINE__, __FILE__)
 

Test a test condition.

Will throw a TestException if condition is false

Parameters:
condition any C++ expression containing only ASCII letters, optional encoded in ASCIIUtf
 
Last modified 2005-05-08 18:34 by SYSTEM By Artefaktur, Ing. Bureau Kommer