summaryrefslogtreecommitdiff
path: root/source/tests/test_signals.cpp
blob: 0f6d77a9bc4a433e72aebbdccc830722a85023a9 (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
#include "../kit_test/test.h"

#include <cstdlib>
#include <stdexcept>

/*  FIXME
 *  MSVC tests fail in GitHub Actions.
 */

TEST("c++ exception") {
  throw std::exception();
}

TEST("abort") {
  abort();
}

TEST("invalid access") {
  *(volatile int *) nullptr = 42;
}

int main(int argc, char **argv) {
#ifndef _MSC_VER
  if (run_tests(argc, argv) != 1)
    return 1;
#endif

  return 0;
}