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

Function main

examples/module_assertion/unary_assertion.cpp:8–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6#include <memory>
7
8int main() {
9 #ifdef _WIN32
10 _set_abort_behavior(0, _WRITE_ABORT_MSG); // prevents Windows abort pop-up from appearing
11 #endif
12
13 std::signal(SIGABRT, [](int){ std::quick_exit(EXIT_SUCCESS); }); // treat assert trigger as success
14
15 std::unique_ptr<int> component;
16
17 ASSERT(component.get(), "Cannot invoke handling for an empty component.");
18
19 return EXIT_FAILURE; // treat no assert trigger as failure
20}

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected