Macaulay2 Engine
Loading...
Searching...
No Matches
testMain.cpp File Reference

main() of the M2-unit-tests binary — boots the engine, then runs gtest. More...

#include <gtest/gtest.h>
#include <M2/gc-include.h>
#include <engine.h>

Go to the source code of this file.

Functions

int main (int argc, char **argv)

Detailed Description

main() of the M2-unit-tests binary — boots the engine, then runs gtest.

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

Three calls in strict order: IM2_initialize() brings up the engine's static state (global rings, monoid prefab tables, the bdwgc collector, FLINT / MPFR singletons) so every subsequent test sees a live engine; InitGoogleTest parses gtest's --gtest_filter / --gtest_repeat and similar flags out of argv; RUN_ALL_TESTS dispatches to gtest's actual driver and returns its summary status as the process exit code. The ordering is load-bearing — engine calls during test setup would crash on uninitialised globals if IM2_initialize ran last.

The companion harness files (M2-cpp-replacement.cpp stubs out system_interrupted, fromStream.cpp carries per-ring stream-parser specialisations, util-polyring-creation.* gives tests one-line polynomial-ring builders) are all covered by the same file-test-harness markdown.

See also
engine.h
ARingTest.hpp
RingTest.hpp
util-polyring-creation.hpp

Definition in file testMain.cpp.