# | Line 237 | Line 237 | void RectMatrixTestCase::testDiv() { | |
---|---|---|
237 | ||
238 | CPPUNIT_ASSERT(m1 / 2.0 * 2.0 == m1); | |
239 | ||
240 | + | |
241 | } | |
242 | ||
243 | void RectMatrixTestCase::testAccessEntries(){ | |
# | Line 250 | Line 251 | void RectMatrixTestCase::testRowColOperations() { | |
251 | ||
252 | //test getRow | |
253 | row = e.getRow(0); | |
254 | < | CPPUNIT_ASSERT(row[0] == 2.0 && row[1] == 4.0 && row[2] == 1.0); |
255 | < | |
254 | > | CPPUNIT_ASSERT_DOUBLES_EQUAL(row[0], 2.0, oopse::epsilon); |
255 | > | CPPUNIT_ASSERT_DOUBLES_EQUAL(row[1], 4.0, oopse::epsilon); |
256 | > | CPPUNIT_ASSERT_DOUBLES_EQUAL(row[2], 1.0, oopse::epsilon); |
257 | //test setRow | |
258 | row[0] = 2.0; | |
259 | row[1] = 4.0; | |
# | Line 268 | Line 270 | void RectMatrixTestCase::testRowColOperations() { | |
270 | CPPUNIT_ASSERT(m == e); | |
271 | ||
272 | //test getCol | |
273 | < | col = e.getCol(1); |
274 | < | CPPUNIT_ASSERT(col[0] == 4.0 && col[1] == 0.0 && col[2] == 6.0); |
275 | < | |
273 | > | col = e.getColum(1); |
274 | > | CPPUNIT_ASSERT_DOUBLES_EQUAL(col[0], 4.0, oopse::epsilon); |
275 | > | CPPUNIT_ASSERT_DOUBLES_EQUAL(col[1], 0.0, oopse::epsilon); |
276 | > | CPPUNIT_ASSERT_DOUBLES_EQUAL(col[2], 6.0, oopse::epsilon); |
277 | //test setCol | |
278 | col[0] = 2.0; | |
279 | col[1] = 0.0; |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |