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

gtest coverage for the legacy Z_mod ring (modular arithmetic via ring_elem). More...

#include "RingTest.hpp"
#include "ZZp.hpp"

Go to the source code of this file.

Functions

template<>
ring_elem getElement< Z_mod > (const Z_mod &R, int index)
 TEST (RingZZmod32003, fromStream)
 TEST (RingZZmod101, create)
 TEST (RingZZmod101, ones)
 TEST (RingZZmod101, negate)
 TEST (RingZZmod101, add)
 TEST (RingZZmod101, subtract)
 TEST (RingZZmod101, multDivide)
 TEST (RingZZmod101, axioms)
 TEST (RingZZmod101, power)
 TEST (RingZZmod101, syzygy)
 TEST (RingZZmod2, create)
 TEST (RingZZmod2, ones)
 TEST (RingZZmod2, negate)
 TEST (RingZZmod2, add)
 TEST (RingZZmod2, subtract)
 TEST (RingZZmod2, multDivide)
 TEST (RingZZmod2, axioms)
 TEST (RingZZmod2, power)
 TEST (RingZZmod2, syzygy)

Detailed Description

gtest coverage for the legacy Z_mod ring (modular arithmetic via ring_elem).

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

Specialises RingTest.hpp's getElement<Z_mod> by reusing the integer-side getElement<RingZZ> output and feeding it through R.from_int, which keeps the random source shared across the legacy Ring*Test.cpp suite. The TEST(RingZZmod32003, fromStream) case exercises the stream-input pipeline (parsing "+1234 +345 -235*a" into a sequence of ring_elems and round-tripping through R.elem_text_out), while the TEST(RingZZmod101, *) cases pin down construction at small primes, coefficient_type == COEFF_BASIC, the "ZZ/101" print name, and the standard arithmetic battery.

Companion to RingZZTest.cpp, RingQQTest.cpp, RingRRRTest.cpp, RingCCCTest.cpp, and RingTowerTest.cpp under the same file-ring-tests markdown. The aring-side counterpart is ARingZZpTest.cpp, which exercises the templated path.

See also
RingTest.hpp
ZZp.hpp
ARingZZpTest.cpp
fromStream.cpp

Definition in file RingZZpTest.cpp.