blob: 6b0fb28df40622baa56676c01cb1a77c0dd4e051 (
plain)
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
33
|
#define KIT_TEST_IMPLEMENTATION
#include "../kit/kit_test.h"
#include <cstdlib>
#include <stdexcept>
TEST("c++ exception") {
throw std::exception();
}
TEST("abort") {
abort();
}
TEST("invalid access") {
*(volatile int *) nullptr = 42;
}
int main(int argc, char **argv) {
// FIXME
// On Windows, doesn't work for some reason...
// Both MSVC and MinGW.
//
#ifndef _WIN32
if (run_tests(argc, argv) != 1)
return 1;
#endif
return 0;
}
#undef KIT_TEST_FILE
|