ACDK Unit Test (acdk_tools_aunit) is a library to create regression tests for
acdk classes. It is inspired by the Xtrem Programming tool from
Kent Beck.
The idea for unit tests is to write an executable
for a unit, which make a self test for each class
in this unit. A unit is mostly identical to the collection
of classes of a C++ namespace.
In ACDK projects tests can be found in the ./tests
directory.
ACDK C++ libraries, which includes Metainfo, may also be tested
via CfgScript files.
Insert this into a CPP for the test driver:
// C++
using namespace acdk::tools::aunit;
TestRunnerStaticAdder scriptTests(new CfgScriptTestSuite("$(ACDKHOME)/acdk_sql_sqlite/cfg/csf/tests/acdk/sql/sqlite", true));
will execute all CfgScript in the directory $(ACDKHOME)/acdk_sql_sqlite/cfg/csf/tests/acdk/sql/sqlite (and subdirectories)
which ends with _Test.csf as unit test.
To run ACDK Unit test, there is also a GUI runner avaible.
To run the AcdkTestRunner you have also to compile the ACDK WX module.
Then type: acdkcfgscript[_d.exe|_r.exe] acdk_core/cfg/csf/lib/test/AcdkTestRunner.csf.