Changeset 872 for trunk/test/half.cpp
 Timestamp:
 Aug 29, 2011, 2:07:54 AM (11 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/test/half.cpp
r871 r872 55 55 half a = half::makebits(i); 56 56 uint16_t b = i; 57 CPPUNIT_ASSERT_EQUAL(a.bits (), b);57 CPPUNIT_ASSERT_EQUAL(a.bits, b); 58 58 } 59 59 } … … 65 65 half a = half::makeslow(pairs[i].f); 66 66 uint16_t b = pairs[i].x; 67 CPPUNIT_ASSERT_EQUAL(a.bits (), b);67 CPPUNIT_ASSERT_EQUAL(a.bits, b); 68 68 } 69 69 } … … 75 75 half a = half::makefast(pairs[i].f); 76 76 uint16_t b = pairs[i].x; 77 CPPUNIT_ASSERT_EQUAL(a.bits (), b);77 CPPUNIT_ASSERT_EQUAL(a.bits, b); 78 78 } 79 79 } … … 191 191 { 192 192 CPPUNIT_ASSERT(!isnan(f)); 193 CPPUNIT_ASSERT_EQUAL(g.bits (), h.bits());193 CPPUNIT_ASSERT_EQUAL(g.bits, h.bits); 194 194 } 195 195 } … … 259 259 260 260 half a = one + 0.0f; 261 CPPUNIT_ASSERT_EQUAL(one.bits (), a.bits());261 CPPUNIT_ASSERT_EQUAL(one.bits, a.bits); 262 262 a += 0.0f; 263 CPPUNIT_ASSERT_EQUAL(one.bits (), a.bits());263 CPPUNIT_ASSERT_EQUAL(one.bits, a.bits); 264 264 a = 0.0f; 265 CPPUNIT_ASSERT_EQUAL(one.bits (), a.bits());265 CPPUNIT_ASSERT_EQUAL(one.bits, a.bits); 266 266 a *= 1.0f; 267 CPPUNIT_ASSERT_EQUAL(one.bits (), a.bits());267 CPPUNIT_ASSERT_EQUAL(one.bits, a.bits); 268 268 a /= 1.0f; 269 CPPUNIT_ASSERT_EQUAL(one.bits (), a.bits());269 CPPUNIT_ASSERT_EQUAL(one.bits, a.bits); 270 270 271 271 half b = one + 0.0f; 272 CPPUNIT_ASSERT_EQUAL(one.bits (), b.bits());272 CPPUNIT_ASSERT_EQUAL(one.bits, b.bits); 273 273 b += 1.0f; 274 CPPUNIT_ASSERT_EQUAL(two.bits (), b.bits());274 CPPUNIT_ASSERT_EQUAL(two.bits, b.bits); 275 275 b *= 2.0f; 276 CPPUNIT_ASSERT_EQUAL(four.bits (), b.bits());276 CPPUNIT_ASSERT_EQUAL(four.bits, b.bits); 277 277 b = 2.0f; 278 CPPUNIT_ASSERT_EQUAL(two.bits (), b.bits());278 CPPUNIT_ASSERT_EQUAL(two.bits, b.bits); 279 279 b /= 2.0f; 280 CPPUNIT_ASSERT_EQUAL(one.bits (), b.bits());280 CPPUNIT_ASSERT_EQUAL(one.bits, b.bits); 281 281 282 282 half c = 1.0f  zero; 283 CPPUNIT_ASSERT_EQUAL(one.bits (), c.bits());283 CPPUNIT_ASSERT_EQUAL(one.bits, c.bits); 284 284 285 285 half d = 2.0f  one; 286 CPPUNIT_ASSERT_EQUAL(one.bits (), d.bits());286 CPPUNIT_ASSERT_EQUAL(one.bits, d.bits); 287 287 288 288 half e = 2.0f + (one); 289 CPPUNIT_ASSERT_EQUAL(one.bits (), e.bits());289 CPPUNIT_ASSERT_EQUAL(one.bits, e.bits); 290 290 291 291 half f = (2.0f * two) / (1.0f + one); 292 CPPUNIT_ASSERT_EQUAL(two.bits (), f.bits());292 CPPUNIT_ASSERT_EQUAL(two.bits, f.bits); 293 293 } 294 294
Note: See TracChangeset
for help on using the changeset viewer.