|
Macaulay2 Engine
|
gtest coverage for the FLINT-backed M2::ARingQQFlint rational aring. More...
#include <cstdio>#include <string>#include <iostream>#include <sstream>#include <memory>#include <gtest/gtest.h>#include <mpfr.h>#include "aring-qq-flint.hpp"#include "ARingTest.hpp"Go to the source code of this file.
Functions | |
| gmp_ZZ | getRandomInteger () |
| template<> | |
| void | getElement< M2::ARingQQFlint > (const M2::ARingQQFlint &R, int index, M2::ARingQQFlint::ElementType &result) |
| TEST (ARingQQFlint, create) | |
| TEST (ARingQQFlint, display) | |
| TEST (ARingQQFlint, arithmetic) | |
gtest coverage for the FLINT-backed M2::ARingQQFlint rational aring.
Plugs M2::ARingQQFlint into the ARingTest.hpp harness via the getElement<M2::ARingQQFlint> specialisation: indices < 50 produce the deterministic [-25, 24] integer prefix (covering zero, plus / minus one, and small integer canonicalisations of fmpq_t), and the rest come from R.random(result) so the random source is the ring's own FLINT-backed draw. The standard testSomeMore battery then runs arithmetic, equality, inverse, and stream round-trips against the FLINT canonicalised representation.
Cross-checks against ARingQQGmpTest.cpp (same operations over GMP mpq_t) are the regression net the file-aring-zz-tests family relies on; a divergence between the two reveals a FLINT regression, a GMP edge case, or a wrapper bug. Historic catches include a fmpq_canonicalise sign bug on 0/-1.
Definition in file ARingQQFlintTest.cpp.