File: test_main.cpp

package info (click to toggle)
ismrmrd 1.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,408 kB
  • sloc: cpp: 12,225; ansic: 2,449; xml: 453; python: 42; makefile: 15
file content (26 lines) | stat: -rw-r--r-- 685 bytes parent folder | download | duplicates (2)
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
#define BOOST_TEST_DYN_LINK
#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);