Esempio n. 1
0
int main(int argc, char **argv)
{
  Pooma::initialize(argc, argv);
  tester = new Pooma::Tester(argc, argv);

  testTinyMatrixDot();
  testVectorDot();
  testTinyMatrixEquality();
  testVectorEquality();
  testTinyMatrixAdd();
  testVectorAdd();
  testTinyMatrixNegate();
  testVectorNegate();
  testVectorScalar();
  testTinyMatrixScalar();
  testVectorDotTinyMatrix();
  testTinyMatrixDotVector();
  testTinyMatrixDot2();
  testTinyMatrixDotVector2();
  testVectorDotTinyMatrix2();
  testVectorAccum();
  testTinyMatrixAccum();
  testNorm();
#if POOMA_EXCEPTIONS
  testBoundsChecking();
#endif

  int ret = tester->results("t1");
  Pooma::finalize();
  return ret;
}
Esempio n. 2
0
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;
}