File: main.cpp

package info (click to toggle)
libtut 0.0.20070706-3
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye
  • size: 1,144 kB
  • sloc: cpp: 3,588; xml: 137; makefile: 18; ansic: 9
file content (32 lines) | stat: -rw-r--r-- 476 bytes parent folder | download | duplicates (4)
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
#include <tut/tut.hpp>
#include <tut/tut_reporter.hpp>
#include <iostream>

using std::exception;
using std::cerr;
using std::endl;

namespace tut
{
    
test_runner_singleton runner;

}

int main()
{
    tut::reporter reporter;
    tut::runner.get().set_callback(&reporter);

    try
    {
        tut::runner.get().run_tests();
    }
    catch (const std::exception& ex)
    {
        cerr << "tut raised ex: " << ex.what() << endl;
        return 1;
    }

    return 0;
}