@@ -22,10 +22,11 @@ @implementation TestsAppDelegate (OFMatrix4x4Tests) - (void)matrix4x4Tests { void *pool = objc_autoreleasePoolPush(); OFMatrix4x4 *matrix, *matrix2; + OFVector3D vec3; TEST(@"+[identityMatrix]", memcmp([[OFMatrix4x4 identityMatrix] values], (float [16]){ 1, 0, 0, 0, 0, 1, 0, 0, @@ -84,8 +85,12 @@ 10000, 22800, 35600, 48400, 11000, 25400, 39800, 54200, 12000, 28000, 44000, 60000 }]]) + TEST(@"-[transformedVector3D:]", + R((vec3 = [matrix transformedVector3D: OFMakeVector3D(1, 2, 3)])) && + vec3.x == 14 && vec3.y == 38 && vec3.z == 62) + objc_autoreleasePoolPop(pool); } @end