Changeset 982 for trunk/test/unit
 Timestamp:
 Sep 26, 2011, 2:00:52 AM (11 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/test/unit/real.cpp
r979 r982 98 98 float a4 = real(1.0f) + real(1.0f); 99 99 float a5 = real(1.0f) + real(0.125f); 100 double a6 = real(3.13609818956293918) 101 + real(0.00005972154828114); 102 float a7 = real(1.0f) + real(0.125f); 103 double a8 = real(0.10000000002) + real(2.0e11); 100 104 101 105 LOLUNIT_ASSERT_EQUAL(a1, 1.0f); … … 104 108 LOLUNIT_ASSERT_EQUAL(a4, 2.0f); 105 109 LOLUNIT_ASSERT_EQUAL(a5, 1.125f); 110 LOLUNIT_ASSERT_DOUBLES_EQUAL(a6, 3.1361579, 0.000001); 111 LOLUNIT_ASSERT_EQUAL(a7, 0.875f); 112 LOLUNIT_ASSERT_DOUBLES_EQUAL(a8, 0.1, 1.0e13); 106 113 } 107 114 … … 140 147 float m3 = a1 / a2; 141 148 float m4 = a2 / a2; 149 float m5 = a1 / a2; 142 150 143 151 LOLUNIT_ASSERT_EQUAL(m1, 1.0f); … … 145 153 LOLUNIT_ASSERT_EQUAL(m3, 0.5f); 146 154 LOLUNIT_ASSERT_EQUAL(m4, 1.0f); 155 LOLUNIT_ASSERT_EQUAL(m5, 0.5f); 147 156 } 148 157 };
Note: See TracChangeset
for help on using the changeset viewer.