znone
2021-03-25 9b81cdebba95f1b6e687191c630c1f8f6cf0df16
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#ifndef _TEST_SUITE_H_
#define _TEST_SUITE_H_
 
#include <exception>
#include <cpptest.h>
 
class TestSuite : public Test::Suite
{
protected:
    void assert_exception(const char* file, int line, std::exception& e)
    {
        assertment(Test::Source(file, line, e.what()));
    }
};
 
#define ASSERT_EXCEPTION(e) \
    assert_exception(__FILE__, __LINE__, e);
 
#endif //_TEST_SUITE_H_