37#include <gtest/gtest.h>
71 EXPECT_EQ(R.
cardinality(),
static_cast<size_t>(-1));
90 EXPECT_TRUE(strcmp(o.
str(),
"24/23") == 0);
91 std::cout <<
"a = ." << o.
str() <<
"." << std::endl;
94 EXPECT_EQ(R.
cardinality(),
static_cast<size_t>(-1));
99TEST(ARingQQFlint, arithmetic)
void getElement< M2::ARingQQFlint >(const M2::ARingQQFlint &R, int index, M2::ARingQQFlint::ElementType &result)
TEST(ARingQQFlint, create)
gmp_ZZ getRandomInteger()
void testAdd(const T &R, int ntrials)
void testNegate(const T &R, int ntrials)
void testReciprocal(const T &R, int ntrials)
void testCoercions(const T &R)
void testAxioms(const T &R, int ntrials)
void testSubtract(const T &R, int ntrials)
void testMultiply(const T &R, int ntrials)
std::string ringName(const T &R)
Shared gtest harness for the ARing*Test.cpp suite.
M2::ARingQQFlint — rationals backed by FLINT's fmpq with small-value inlining.
void nextElement(typename RingType::ElementType &result)
void init(ElementType &result) const
void divide(ElementType &result, const ElementType &a, const ElementType &b) const
test doc
static void clear(ElementType &result)
void elem_text_out(buffer &o, const ElementType &a, bool p_one=true, bool p_plus=false, bool p_parens=false) const
size_t cardinality() const
void random(ElementType &result) const
size_t characteristic() const
void set_from_long(ElementType &result, long a) const
wrapper for the flint fmpq_t integer representation
VALGRIND_MAKE_MEM_DEFINED & result(result)