File: test_main.cpp

package info (click to toggle)
ismrmrd 1.14.3-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,564 kB
  • sloc: cpp: 6,439; ansic: 2,276; xml: 1,025; sh: 187; python: 72; makefile: 42
file content (25 lines) | stat: -rw-r--r-- 657 bytes parent folder | download | duplicates (3)
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
#define BOOST_TEST_MODULE "ISMRMRD Unit Tests"
#include <boost/test/unit_test.hpp>

#include "ismrmrd/ismrmrd.h"
using namespace ISMRMRD;

void silent_error_handler(const char *file, int line,
        const char *function, int code, const char *msg)
{
}

struct GlobalConfig {
    // global setup
    GlobalConfig()
    {
        // enable more verbose testing output
        boost::unit_test::unit_test_log.set_threshold_level(boost::unit_test::log_test_units);
        // silence ISMRMRD errors on stdout
        ismrmrd_set_error_handler(silent_error_handler);
    }
    // global teardown
    ~GlobalConfig() { }
};

BOOST_GLOBAL_FIXTURE(GlobalConfig);