Am Freitag, 19. Oktober 2007 10:13:39 schrieb David.Adam@math.cnrs.fr:
+#define expect_vec3(expectedvec,gotvec)
ok((fabs(expectedvec.x-gotvec.x)<admitted_error)&&(fabs(expectedvec.y-gotvec.y)<admitted_error)&&(fabs(expectedvec.z-gotvec.z)<admitted_error),"Expected Vector= (%f, %f,%f)\n , Got Vector= (%f, %f, %f)\n", expectedvec.x, expectedvec.y, expectedvec.z, gotvec.x, gotvec.y, gotvec.z);
Usually inline functions are prefered over macros. I don't know how well that works with ok though, since it might drop the line of the error and make debugging harder.