Menu

[2d617b]: / tests / testNDCMain.cpp  Maximize  Restore  History

Download this file

26 lines (19 with data), 637 Bytes

 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;
}
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.