| 237 | 
  | 
 | 
| 238 | 
  | 
    CPPUNIT_ASSERT(m1 / 2.0 * 2.0 == m1); | 
| 239 | 
  | 
 | 
| 240 | 
+ | 
 | 
| 241 | 
  | 
} | 
| 242 | 
  | 
 | 
| 243 | 
  | 
void RectMatrixTestCase::testAccessEntries(){ | 
| 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;     | 
| 271 | 
  | 
     | 
| 272 | 
  | 
    //test getCol | 
| 273 | 
  | 
    col = e.getColum(1); | 
| 274 | 
< | 
    CPPUNIT_ASSERT(col[0] == 4.0 && col[1] == 0.0 && col[2] == 6.0);     | 
| 275 | 
< | 
 | 
| 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;     |