Changeset 969 for trunk/test/unit
 Timestamp:
 Sep 21, 2011, 7:10:21 PM (11 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/test/unit/real.cpp
r967 r969 26 26 LOLUNIT_TEST(test_real_from_float) 27 27 { 28 float x = real4k(0.0f); 29 float y = real4k(1.0f); 28 float x = real(0.0f); 29 float y = real(1.0f); 30 float z = real(1.5f); 30 31 31 32 LOLUNIT_ASSERT_EQUAL(x, 0.0f); 32 33 LOLUNIT_ASSERT_EQUAL(y, 1.0f); 34 LOLUNIT_ASSERT_EQUAL(z, 1.5f); 35 } 36 37 LOLUNIT_TEST(test_real_mul) 38 { 39 real x(1.25f); 40 real y(1.5f); 41 real z(1.99999f); 42 real w(1.5f); 43 44 float m1 = x * x; 45 float m2 = y * y; 46 float m3 = z * z; 47 float m4 = w * w; 48 49 LOLUNIT_ASSERT_EQUAL(m1, 1.25f * 1.25f); 50 LOLUNIT_ASSERT_EQUAL(m2, 1.5f * 1.5f); 51 LOLUNIT_ASSERT_EQUAL(m3, 1.99999f * 1.99999f); 52 LOLUNIT_ASSERT_EQUAL(m4, 1.5f * 1.5f); 33 53 } 34 54 };
Note: See TracChangeset
for help on using the changeset viewer.