|
Macaulay2 Engine
|
gtest coverage for M2::ARingZZp (and indirectly the FFPACK-backed variant). More...
#include <cstdio>#include <string>#include <iostream>#include <sstream>#include <memory>#include <gtest/gtest.h>#include <mpfr.h>#include "reader.hpp"#include "ZZp.hpp"#include "aring-zzp-ffpack.hpp"#include "aring-zzp.hpp"#include "ARingTest.hpp"#include "../aring-zzp-flint.hpp"Go to the source code of this file.
Functions | |
| gmp_ZZ | getRandomInteger () |
| template<> | |
| void | getElement< M2::ARingZZp > (const M2::ARingZZp &R, int index, M2::ARingZZp::ElementType &result) |
| template<typename RT> | |
| void | testCoerceToLongInteger (const RT &R) |
| TEST (RingZZp, create) | |
| TEST (ARingZZp, create) | |
| TEST (ARingZZp, arithmetic101) | |
| TEST (ARingZZp, arithmetic32749) | |
| TEST (ARingZZp, arithmetic2) | |
| TEST (ARingZZp, arithmetic3) | |
| TEST (ARingZZp, fromStream) | |
| template<> | |
| void | getElement< M2::ARingZZpFFPACK > (const M2::ARingZZpFFPACK &R, int index, M2::ARingZZpFFPACK::ElementType &result) |
| TEST (ARingZZpFFPACK, create) | |
| TEST (ARingZZpFFPACK, arithmetic101) | |
| TEST (ARingZZpFFPACK, arithmetic2) | |
| TEST (ARingZZpFFPACK, arithmetic3) | |
| TEST (ARingZZpFFPACK, arithmetic66000007) | |
| TEST (ARingZZpFFPACK, arithmetic67108859) | |
| TEST (ARingZZpFFPACK, arithmetic33500479) | |
| TEST (ARingZZp, read) | |
| template<> | |
| void | getElement< M2::ARingZZpFlint > (const M2::ARingZZpFlint &R, int index, M2::ARingZZpFlint::ElementType &result) |
| TEST (ARingZZpFlint, create) | |
| TEST (ARingZZpFlint, arithmetic101) | |
| TEST (ARingZZpFlint, arithmetic2) | |
| TEST (ARingZZpFlint, arithmetic3) | |
| TEST (ARingZZpFlint, arithmetic66000007) | |
| TEST (ARingZZpFlint, arithmetic67108859) | |
| TEST (ARingZZpFlint, arithmetic33500479) | |
| TEST (ARingZZpFlint, arithmetic9223372036854775783) | |
| TEST (ARingZZpFlint, arithmetic18446744073709551557) | |
Variables | |
| static bool | maxH_initialized = false |
| static mpz_t | maxH |
gtest coverage for M2::ARingZZp (and indirectly the FFPACK-backed variant).
Specialises ARingTest.hpp's getElement<M2::ARingZZp> with the deterministic [-25, 24] prefix followed by random gmp_ZZ draws, and hosts the file-scoped getRandomInteger() definition that the whole ARingZZ* test family pulls in via extern. The bound maxH = 10^11 keeps the random draws human-readable in failure messages while still covering the interesting paths in modular reduction. aring-zzp-ffpack.hpp gets included alongside aring-zzp.hpp so a build with FFPACK exercises that backend in the same test run.
Sibling files ARingZZTest.cpp, ARingQQGmpTest.cpp, and ARingQQFlintTest.cpp (covered by the same file-aring-zz-tests markdown) share this random source so the integer / modular / rational suites stay reproducible relative to each other.
Definition in file ARingZZpTest.cpp.