File: testNDCMain.cpp

package info (click to toggle)
log4cpp 1.1.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,444 kB
  • sloc: cpp: 6,715; sh: 3,670; ansic: 1,049; makefile: 295
file content (25 lines) | stat: -rw-r--r-- 637 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include <vector>
#include "cppunit/TestRegistry.h"
#include "cppunit/TextTestResult.h"
#include "cppunit/Test.h"
#include "cppunit/TestSuite.h"
#include "log4cpp/NDC.hh"
#include "NDCTest.hh"

int main(int argc, char** argv) {
    NDCTest<log4cpp::NDC> nDCTest("NDCTest<NDC>");

    CppUnit::TextTestResult result;
    CppUnit::TestSuite suite;

    nDCTest.registerTests(&suite);

    std::vector<CppUnit::Test*> tests = CppUnit::TestRegistry::getRegistry().getAllTests();
    for(std::vector<CppUnit::Test*>::iterator i = tests.begin(); i != tests.end(); i++) {
        (*i)->run(&result);
    }

    cout << result;

    return 0;
}