Blame view

morfeusz/test_runner.cpp 853 Bytes
Michał Lenart authored
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
26
27
28
29
30
31
32
/*
 * File:   test_results_iterator.cpp
 * Author: lennyn
 *
 * Created on Jun 27, 2014, 11:44:49 AM
 */

#include <cppunit/BriefTestProgressListener.h>
#include <cppunit/CompilerOutputter.h>
#include <cppunit/extensions/TestFactoryRegistry.h>
#include <cppunit/TestResult.h>
#include <cppunit/TestResultCollector.h>
#include <cppunit/TestRunner.h>

#include "tests/TestCAPI.hpp"
#include "tests/TestMorfeusz.hpp"

int main() {
    CPPUNIT_NS::TestRunner runner;
    CPPUNIT_NS::TestResult controller;
    CPPUNIT_NS::TestResultCollector result;
    controller.addListener(&result);

    runner.addTest(TestCAPI::suite());
    runner.addTest(TestMorfeusz::suite());

    runner.run(controller);

    CPPUNIT_NS::CompilerOutputter outputter(&result, CPPUNIT_NS::stdCOut());
    outputter.write();
    return result.wasSuccessful() ? 0 : 1;
}