MCPcopy Create free account
hub / github.com/DmitriBogdanov/UTL / main

Function main

examples/module_assertion/binary_assertion.cpp:7–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5#include <csignal>
6
7int main() {
8 #ifdef _WIN32
9 _set_abort_behavior(0, _WRITE_ABORT_MSG); // prevents Windows abort pop-up from appearing
10 #endif
11
12 std::signal(SIGABRT, [](int){ std::quick_exit(EXIT_SUCCESS); }); // treat assert trigger as success
13
14 const int rows = 10;
15 const int cols = 12;
16
17 ASSERT(rows == cols, "Linear system requires a square matrix.");
18
19 return EXIT_FAILURE; // treat no assert trigger as failure
20}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected