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

◆ testSomeMore()

template<typename T>
void testSomeMore ( const T & R)

Definition at line 72 of file ARingTest.hpp.

73{
74 typename T::ElementType a, b, c, d;
75 R.init(a);
76 R.init(b);
77 R.init(c);
78 R.init(d);
79
80 R.set_from_long(a, 27);
81 R.set_from_long(b, static_cast<int>(R.characteristic()) - 11);
82 R.set_from_long(c, 16);
83 R.add(d, a, b);
84
85 buffer o;
86 o << "a=";
87 R.elem_text_out(o, a, true);
88 o << " b=";
89 R.elem_text_out(o, b, true);
90 o << " c=";
91 R.elem_text_out(o, c, true);
92 o << " d=a+b=";
93 R.elem_text_out(o, d, true);
94 std::cout << o.str() << std::endl;
95
96 EXPECT_TRUE(R.is_equal(c, d));
97
98 R.clear(a);
99 R.clear(b);
100 R.clear(c);
101 R.clear(d);
102}
char * str()
Definition buffer.hpp:72

References buffer::str(), and T.

Referenced by TEST(), TEST(), and TEST().