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

gtest coverage for the legacy RingQQ rational ring (globalQQ). More...

#include "RingTest.hpp"
#include "aring-glue.hpp"
#include "ZZp.hpp"

Go to the source code of this file.

Functions

template<>
ring_elem getElement< RingQQ > (const RingQQ &R, int index)
 TEST (RingQQ, create)
 TEST (RingQQ, ones)
 TEST (RingQQ, negate)
 TEST (RingQQ, add)
 TEST (RingQQ, subtract)
 TEST (RingQQ, multDivide)
 TEST (RingQQ, axioms)
 TEST (RingQQ, power)
 TEST (RingQQ, syzygy)

Variables

static bool maxH_initialized = false
static mpz_t maxH

Detailed Description

gtest coverage for the legacy RingQQ rational ring (globalQQ).

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

Specialises RingTest.hpp's getElement<RingQQ> with the deterministic [-25, 24] integer prefix followed by random rationals drawn from rawRandomQQ(maxH) with maxH = 10^11; the gmp_QQ result feeds through R.from_rational so any canonicalisation bugs surface in the test loop. Standard arithmetic and identity assertions run against globalQQ — the engine's shared RingQQ instance — and double as a regression check on aring-glue.hpp, which threads the modern ARingQQ* backends back into the legacy Ring surface the interpreter still uses.

Companion to RingZZTest.cpp, RingZZpTest.cpp, RingRRRTest.cpp, RingCCCTest.cpp, and RingTowerTest.cpp (all under the file-ring-tests markdown). Cross-checks against the aring-side ARingQQGmpTest.cpp / ARingQQFlintTest.cpp keep the two interfaces in sync.

See also
RingTest.hpp
aring-glue.hpp
ARingQQGmpTest.cpp
interface/random.h

Definition in file RingQQTest.cpp.