int main()
{
     FILE * f;
     char fname[FILENAME_MAX] = "log_testClassPoint.txt";
     char cCurrentPath[FILENAME_MAX];
     f = fopen(fname, "w");
     if (!GetCurrentDir(cCurrentPath, sizeof(cCurrentPath))) {
          return EXIT_FAILURE;
     }
     cCurrentPath[sizeof(cCurrentPath) - 1] = '\0'; /* not really required */

     fprintf (f, "The current working directory is %s\n\n", cCurrentPath);

     int res = 0, ntests = 0;

     res += testNorm(f);
     ntests++;
     res += testNormalized(f);
     ntests++;
     res += testScalarP(f);
     ntests++;
     res += testDet(f);
     ntests++;
     res += testCoordTransToEllipse(f);
     ntests++;
     res += testCoordTransToCart(f);
     ntests++;
     res += testRotate(f);
     ntests++;

     fclose(f);
     return (res==ntests)?EXIT_SUCCESS:EXIT_FAILURE;
}
Exemple #2
0
void testMatrices() {
	std::cout << "Testing Identity" << std::endl;
	testIdentity();
	std::cout << "Testing Translate" << std::endl;
	testTranslate();
	std::cout << "Testing Scale" << std::endl;
	testScale();
	std::cout << "Testing Rotate" << std::endl;
	testRotate();
	std::cout << "Testing Identity Multiply" << std::endl;
	testIdentityMultiply();
	std::cout << "Testing Rotate Translate Multiplication" << std::endl;
	testRotateTranslate();
}