|
Macaulay2 Engine
|
gtest coverage for the FLINT-backed Galois-field aring M2::ARingGFFlint. More...
#include <cstdio>#include <string>#include <iostream>#include <sstream>#include <memory>#include <gtest/gtest.h>#include <mpfr.h>#include "debug.hpp"#include "aring-gf-flint.hpp"#include "ARingTest.hpp"Go to the source code of this file.
Functions | |
| template<> | |
| void | getElement< M2::ARingGFFlint > (const M2::ARingGFFlint &R, int index, M2::ARingGFGivaro::ElementType &result) |
| TEST (ARingGFFlint, create) | |
| TEST (ARingGFFlint, random) | |
| TEST (ARingGFFlint, arithmetic) | |
Variables | |
| static const int | nelements = 200 |
| static int | randomVals [nelements] |
gtest coverage for the FLINT-backed Galois-field aring M2::ARingGFFlint.
Plugs M2::ARingGFFlint into the ARingTest.hpp harness and runs the TEST(ARingGFFlint, create / random / arithmetic) battery over fields GF(5^3) and GF(7^2). A 200-entry hardcoded randomVals array supplies test inputs deterministically, so a flaky RNG can never cause a spurious CI failure — the exact values don't matter so long as they span the field, and pre-baking them also avoids depending on the M2 random subsystem inside a test of the M2 ring stack. The file also carries a getElement<M2::ARingGFGivaro> specialisation for the conditional Givaro-backed path.
The companion GivaroTest.cpp (covered by the same file-aring-gf-tests markdown) smoke-tests the upstream Givaro library directly. The engine ships several GF implementations side by side (FLINT, FLINT-Big, M2 native, Givaro, table-based) for different size regimes; each gets its own ARing*GFTest to isolate backend bugs.
Definition in file ARingGFTest.cpp.