mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-07 22:02:12 +08:00

* moved unit-tests into the dedicated directory unitTest * removed no-more-used files * common code style for test and usage of test_runner.h everywhere * imported video_input changes by Olivier Grégoire (GSoC-2017) Change-Id: Ifbb5585caaa2618c4ab943681814c9afbfc76311 Reviewed-by: Olivier Soldano <olivier.soldano@savoirfairelinux.com>
20 lines
625 B
C++
20 lines
625 B
C++
#include <iostream>
|
|
|
|
#include <cppunit/extensions/TestFactoryRegistry.h>
|
|
#include <cppunit/ui/text/TestRunner.h>
|
|
#include <cppunit/CompilerOutputter.h>
|
|
|
|
#define RING_TEST_RUNNER(suite_name) \
|
|
int main() \
|
|
{ \
|
|
CppUnit::TestFactoryRegistry ®istry = CppUnit::TestFactoryRegistry::getRegistry(suite_name); \
|
|
CppUnit::Test *suite = registry.makeTest(); \
|
|
if(suite->countTestCases() == 0) { \
|
|
std::cout << "No test cases specified for suite \"" << suite_name << "\"\n"; \
|
|
return 1; \
|
|
} \
|
|
CppUnit::TextUi::TestRunner runner; \
|
|
runner.addTest(suite); \
|
|
return runner.run() ? 0 : 1; \
|
|
}
|