|
Last change
on this file since 32842d8 was 45cc89, checked in by Frederik Heber <heber@…>, 16 years ago |
|
MEMLEAK: In many tests World, MemoryUsageObserver, logger or errorLogger being singletons were instantiated but not destroyed.
- in some cases respective includes had to be added.
|
-
Property mode
set to
100644
|
|
File size:
929 bytes
|
| Line | |
|---|
| 1 | /*
|
|---|
| 2 | * InfoUnitTest.cpp
|
|---|
| 3 | *
|
|---|
| 4 | * Created on: Nov 25, 2009
|
|---|
| 5 | * Author: heber
|
|---|
| 6 | */
|
|---|
| 7 |
|
|---|
| 8 | using 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 | #include "log.hpp"
|
|---|
| 20 |
|
|---|
| 21 | #ifdef HAVE_TESTRUNNER
|
|---|
| 22 | #include "UnitTestMain.hpp"
|
|---|
| 23 | #endif /*HAVE_TESTRUNNER*/
|
|---|
| 24 |
|
|---|
| 25 | /********************************************** Test classes **************************************/
|
|---|
| 26 |
|
|---|
| 27 | // Registers the fixture into the 'registry'
|
|---|
| 28 | CPPUNIT_TEST_SUITE_REGISTRATION( InfoTest );
|
|---|
| 29 |
|
|---|
| 30 |
|
|---|
| 31 | void InfoTest::setUp()
|
|---|
| 32 | {
|
|---|
| 33 | };
|
|---|
| 34 |
|
|---|
| 35 |
|
|---|
| 36 | void InfoTest::tearDown()
|
|---|
| 37 | {
|
|---|
| 38 | logger::purgeInstance();
|
|---|
| 39 | };
|
|---|
| 40 |
|
|---|
| 41 | /** UnitTest for FunctionTest().
|
|---|
| 42 | */
|
|---|
| 43 | void InfoTest::FunctionTest()
|
|---|
| 44 | {
|
|---|
| 45 | const char *msg = __func__;
|
|---|
| 46 | class Info test(msg);
|
|---|
| 47 |
|
|---|
| 48 | CPPUNIT_ASSERT_EQUAL( msg , test.FunctionName );
|
|---|
| 49 | CPPUNIT_ASSERT_EQUAL( 1, test.verbosity );
|
|---|
| 50 | };
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.