/* * Project: MoleCuilder * Description: creates and alters molecular systems * Copyright (C) 2010 University of Bonn. All rights reserved. * Please see the LICENSE file or "Copyright notice" in builder.cpp for details. */ /** * \file unit-tests.dox * * Created on: Oct 28, 2011 * Author: heber */ /** * \page unittest "Unit test" * * Unit tests are done via the CppUnit framework (http://cppunit.sourceforge.net/doc/1.8.0/). * * \section Directory structure * * Unit tests are always located in a subfolder \b unittests of the component * that they test, e.g. if checking one of the Parsers, then its unit test * resides in \b src/Parser/unittests. * * \section Adding new tests * * TODO: Documentation - explain how to add tests. * * \section Launching all tests * * All unit tests can be launched as follows: * -# Enter the build directory * -# Enter \b src/unittests * -# Run * \code make check * \endcode * * This will run all present unit tests one after the other. * * \section Launching some tests * * If only some of the tests should be checked, then they have to be launched by * hand via entering the same directory as in the section before and e.g. * \code * ./AnalysisBondsUnitTest * \endcode * Note that to allow for debugging of the unit tests, one has to prepend the * executable as follows: * \code * libtool --mode=execute gdb --args ./AnalysisBondsUnitTest * \endcode * As we use libtool to take care of shared libraries the executables in * \b src/unittests are just scripts. The true executables hide in another * subfolder \b .libs. The scripts set environment variables such that shared * libraries, which have not been installed so far, are found. * * \section Inspecting results * * Results of the test are shown during run. An \a Ok(2) indicates that * two tests for the single launched testsuite passed. * */