source: molecuilder/src/unittests/infounittest.cpp@ edbe74

Last change on this file since edbe74 was 44becc, checked in by Frederik Heber <heber@…>, 15 years ago

Tests now work with Eclipse ECUT's TestRunner.

  • new switch in configure.ac: --enable-ecut
  • all tests are compiled as single test as before
  • and a new TestRunner test suite that combines all test into a single executable which can be run as CppUnit program in Eclipse (and then gives JUnit like output).
  • Property mode set to 100644
File size: 883 bytes
Line 
1/*
2 * InfoUnitTest.cpp
3 *
4 * Created on: Nov 25, 2009
5 * Author: heber
6 */
7
8using namespace std;
9
10#include <cppunit/CompilerOutputter.h>
11#include <cppunit/extensions/TestFactoryRegistry.h>
12#include <cppunit/ui/text/TestRunner.h>
13
14#include <iostream>
15#include <stdio.h>
16
17#include "info.hpp"
18#include "infounittest.hpp"
19
20#ifdef HAVE_TESTRUNNER
21#include "UnitTestMain.hpp"
22#endif /*HAVE_TESTRUNNER*/
23
24/********************************************** Test classes **************************************/
25
26// Registers the fixture into the 'registry'
27CPPUNIT_TEST_SUITE_REGISTRATION( InfoTest );
28
29
30void InfoTest::setUp()
31{
32};
33
34
35void InfoTest::tearDown()
36{
37};
38
39/** UnitTest for FunctionTest().
40 */
41void InfoTest::FunctionTest()
42{
43 const char *msg = __func__;
44 class Info test(msg);
45
46 CPPUNIT_ASSERT_EQUAL( msg , test.FunctionName );
47 CPPUNIT_ASSERT_EQUAL( 1, test.verbosity );
48};
Note: See TracBrowser for help on using the repository browser.