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

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]

Detailed Description

gtest coverage for the FLINT-backed Galois-field aring M2::ARingGFFlint.

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

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.

See also
ARingTest.hpp
aring-gf-flint.hpp
GivaroTest.cpp
ARingZZpTest.cpp

Definition in file ARingGFTest.cpp.