Changeset 907 for trunk/test/matrix.cpp
 Timestamp:
 Sep 6, 2011, 8:43:03 AM (11 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/test/matrix.cpp
r817 r907 140 140 vec3 b(a1); 141 141 vec2 a2(b); 142 CPPUNIT_ASSERT (b.x ==a1.x);143 CPPUNIT_ASSERT (b.y ==a1.y);144 CPPUNIT_ASSERT (b.z ==0.0f);142 CPPUNIT_ASSERT_EQUAL(b.x, a1.x); 143 CPPUNIT_ASSERT_EQUAL(b.y, a1.y); 144 CPPUNIT_ASSERT_EQUAL(b.z, 0.0f); 145 145 CPPUNIT_ASSERT(a2 == a1); 146 146 147 147 vec4 c(a1); 148 148 vec2 a3(c); 149 CPPUNIT_ASSERT (c.x ==a1.x);150 CPPUNIT_ASSERT (c.y ==a1.y);151 CPPUNIT_ASSERT (c.z ==0.0f);152 CPPUNIT_ASSERT (c.w ==0.0f);149 CPPUNIT_ASSERT_EQUAL(c.x, a1.x); 150 CPPUNIT_ASSERT_EQUAL(c.y, a1.y); 151 CPPUNIT_ASSERT_EQUAL(c.z, 0.0f); 152 CPPUNIT_ASSERT_EQUAL(c.w, 0.0f); 153 153 CPPUNIT_ASSERT(a3 == a1); 154 154 } … … 157 157 { 158 158 float d1 = triangular.det(); 159 CPPUNIT_ASSERT (d1 ==24.0f);159 CPPUNIT_ASSERT_EQUAL(d1, 24.0f); 160 160 float d2 = invertible.det(); 161 CPPUNIT_ASSERT (d2 ==1.0f);161 CPPUNIT_ASSERT_EQUAL(d2, 1.0f); 162 162 } 163 163 … … 168 168 mat4 m2 = m0 * m1; 169 169 170 CPPUNIT_ASSERT (m2[0][0] ==1.0f);171 CPPUNIT_ASSERT (m2[1][0] ==0.0f);172 CPPUNIT_ASSERT (m2[2][0] ==0.0f);173 CPPUNIT_ASSERT (m2[3][0] ==0.0f);174 175 CPPUNIT_ASSERT (m2[0][1] ==0.0f);176 CPPUNIT_ASSERT (m2[1][1] ==1.0f);177 CPPUNIT_ASSERT (m2[2][1] ==0.0f);178 CPPUNIT_ASSERT (m2[3][1] ==0.0f);179 180 CPPUNIT_ASSERT (m2[0][2] ==0.0f);181 CPPUNIT_ASSERT (m2[1][2] ==0.0f);182 CPPUNIT_ASSERT (m2[2][2] ==1.0f);183 CPPUNIT_ASSERT (m2[3][2] ==0.0f);184 185 CPPUNIT_ASSERT (m2[0][3] ==0.0f);186 CPPUNIT_ASSERT (m2[1][3] ==0.0f);187 CPPUNIT_ASSERT (m2[2][3] ==0.0f);188 CPPUNIT_ASSERT (m2[3][3] ==1.0f);170 CPPUNIT_ASSERT_EQUAL(m2[0][0], 1.0f); 171 CPPUNIT_ASSERT_EQUAL(m2[1][0], 0.0f); 172 CPPUNIT_ASSERT_EQUAL(m2[2][0], 0.0f); 173 CPPUNIT_ASSERT_EQUAL(m2[3][0], 0.0f); 174 175 CPPUNIT_ASSERT_EQUAL(m2[0][1], 0.0f); 176 CPPUNIT_ASSERT_EQUAL(m2[1][1], 1.0f); 177 CPPUNIT_ASSERT_EQUAL(m2[2][1], 0.0f); 178 CPPUNIT_ASSERT_EQUAL(m2[3][1], 0.0f); 179 180 CPPUNIT_ASSERT_EQUAL(m2[0][2], 0.0f); 181 CPPUNIT_ASSERT_EQUAL(m2[1][2], 0.0f); 182 CPPUNIT_ASSERT_EQUAL(m2[2][2], 1.0f); 183 CPPUNIT_ASSERT_EQUAL(m2[3][2], 0.0f); 184 185 CPPUNIT_ASSERT_EQUAL(m2[0][3], 0.0f); 186 CPPUNIT_ASSERT_EQUAL(m2[1][3], 0.0f); 187 CPPUNIT_ASSERT_EQUAL(m2[2][3], 0.0f); 188 CPPUNIT_ASSERT_EQUAL(m2[3][3], 1.0f); 189 189 } 190 190 … … 196 196 mat4 m2 = m0 * m1; 197 197 198 CPPUNIT_ASSERT (m2[0][0] ==1.0f);199 CPPUNIT_ASSERT (m2[1][0] ==0.0f);200 CPPUNIT_ASSERT (m2[2][0] ==0.0f);201 CPPUNIT_ASSERT (m2[3][0] ==0.0f);202 203 CPPUNIT_ASSERT (m2[0][1] ==0.0f);204 CPPUNIT_ASSERT (m2[1][1] ==1.0f);205 CPPUNIT_ASSERT (m2[2][1] ==0.0f);206 CPPUNIT_ASSERT (m2[3][1] ==0.0f);207 208 CPPUNIT_ASSERT (m2[0][2] ==0.0f);209 CPPUNIT_ASSERT (m2[1][2] ==0.0f);210 CPPUNIT_ASSERT (m2[2][2] ==1.0f);211 CPPUNIT_ASSERT (m2[3][2] ==0.0f);212 213 CPPUNIT_ASSERT (m2[0][3] ==0.0f);214 CPPUNIT_ASSERT (m2[1][3] ==0.0f);215 CPPUNIT_ASSERT (m2[2][3] ==0.0f);216 CPPUNIT_ASSERT (m2[3][3] ==1.0f);198 CPPUNIT_ASSERT_EQUAL(m2[0][0], 1.0f); 199 CPPUNIT_ASSERT_EQUAL(m2[1][0], 0.0f); 200 CPPUNIT_ASSERT_EQUAL(m2[2][0], 0.0f); 201 CPPUNIT_ASSERT_EQUAL(m2[3][0], 0.0f); 202 203 CPPUNIT_ASSERT_EQUAL(m2[0][1], 0.0f); 204 CPPUNIT_ASSERT_EQUAL(m2[1][1], 1.0f); 205 CPPUNIT_ASSERT_EQUAL(m2[2][1], 0.0f); 206 CPPUNIT_ASSERT_EQUAL(m2[3][1], 0.0f); 207 208 CPPUNIT_ASSERT_EQUAL(m2[0][2], 0.0f); 209 CPPUNIT_ASSERT_EQUAL(m2[1][2], 0.0f); 210 CPPUNIT_ASSERT_EQUAL(m2[2][2], 1.0f); 211 CPPUNIT_ASSERT_EQUAL(m2[3][2], 0.0f); 212 213 CPPUNIT_ASSERT_EQUAL(m2[0][3], 0.0f); 214 CPPUNIT_ASSERT_EQUAL(m2[1][3], 0.0f); 215 CPPUNIT_ASSERT_EQUAL(m2[2][3], 0.0f); 216 CPPUNIT_ASSERT_EQUAL(m2[3][3], 1.0f); 217 217 } 218 218
Note: See TracChangeset
for help on using the changeset viewer.