Macaulay2 Engine
Loading...
Searching...
No Matches

◆ TEST() [3/3]

TEST ( ARingQQGMP ,
display  )

Definition at line 74 of file ARingQQGmpTest.cpp.

75{
77
79 buffer o;
80
82 R.init(a);
83 R.init(b);
84 gen.nextElement(a);
85 gen.nextElement(b);
86 R.divide(a, a, b);
87 R.elem_text_out(o, a, true, false, false);
88 EXPECT_TRUE(strcmp(o.str(), "24/23") == 0);
89 std::cout << "a = ." << o.str() << "." << std::endl;
90
91 EXPECT_EQ(ringName(R), "QQGMP");
92 EXPECT_EQ(R.cardinality(), static_cast<size_t>(-1));
93 EXPECT_EQ(R.characteristic(), 0);
94 R.clear(a);
95 R.clear(b);
96}
std::string ringName(const T &R)
size_t cardinality() const
size_t characteristic() const
static void clear(ElementType &result)
void divide(ElementType &result, const ElementType &a, const ElementType &b) const
test doc
void elem_text_out(buffer &o, const ElementType &a, bool p_one=true, bool p_plus=false, bool p_parens=false) const
__mpq_struct ElementType
void init(ElementType &result) const
wrapper for the gmp mpq_t integer representation
char * str()
Definition buffer.hpp:72

References M2::ARingQQGMP::cardinality(), M2::ARingQQGMP::characteristic(), M2::ARingQQGMP::clear(), M2::ARingQQGMP::divide(), M2::ARingQQGMP::elem_text_out(), M2::ARingQQGMP::init(), ARingElementGenerator< RingType >::nextElement(), ringName(), and buffer::str().