Macaulay2 Engine
Loading...
Searching...
No Matches
M2-cpp-replacement.cpp File Reference

Single-symbol stub for system_interrupted() so the gtest binary links without the M2 interpreter. More...

Go to the source code of this file.

Functions

bool system_interrupted ()

Detailed Description

Single-symbol stub for system_interrupted() so the gtest binary links without the M2 interpreter.

Note
AI-generated documentation. Verify against the source before relying on it.

Hosts one line: bool system_interrupted() { return false; }. The engine calls this hook from inner loops to honour Ctrl+C arriving through the interpreter's interrupts.d; the M2-unit-tests binary does not link the interpreter, so the symbol would otherwise be undefined. The stub always reports "not interrupted," which is the correct answer for an automated test run: tests should never time out from a fake Ctrl+C.

The fact that a single one-line replacement is enough to build the engine for testing demonstrates how cleanly the engine / interpreter boundary is drawn — everything else the test binary needs is satisfied by the regular engine libraries. Companion to testMain.cpp, fromStream.cpp, and util-polyring-creation.{cpp,hpp} in the file-test-harness family.

See also
testMain.cpp
fromStream.cpp
util-polyring-creation.hpp
interrupted.hpp

Definition in file M2-cpp-replacement.cpp.