コード例 #1
0
ファイル: TestVector3.cpp プロジェクト: llazarus1/YAGE
void TestVector3::RunTests() {
    TestOperators();
    TestDot();
    TestCross();
    TestAngle();
    TestReflect();
    TestInterpolate();
    TestDirection();
    TestLength();
    TestNormalize();
    TestDistance();
    TestMidpoint();
}
コード例 #2
0
main(int    argc,
     char **argv)
{
char          buf[256];
l_int32       i, j, k, index, conn, depth, bc;
BOX          *box;
PIX          *pix, *pixs, *pixd;
PIXA         *pixa;
L_REGPARAMS  *rp;

    if (regTestSetup(argc, argv, &rp))
        return 1;

    pix = pixRead("feyn.tif");
    box = boxCreate(383, 338, 1480, 1050);
    pixs = pixClipRectangle(pix, box, NULL);
    regTestWritePixAndCheck(rp, pixs, IFF_PNG);  /* 0 */
	    
    for (i = 0; i < 2; i++) {
        conn = 4 + 4 * i;
        for (j = 0; j < 2; j++) {
            depth = 8 + 8 * j;
            for (k = 0; k < 2; k++) {
                bc = k + 1;
                index = 4 * i + 2 * j + k;
                fprintf(stderr, "Set %d\n", index);
                if (DEBUG) {
                    fprintf(stderr, "%d: conn = %d, depth = %d, bc = %d\n",
                            rp->index + 1, conn, depth, bc);
                }
                pixa = pixaCreate(0);
                pixSaveTiled(pixs, pixa, 1, 1, 20, 8);
                TestDistance(pixa, pixs, conn, depth, bc, rp);
                pixd = pixaDisplay(pixa, 0, 0);
                pixDisplayWithTitle(pixd, 0, 0, NULL, rp->display);
                pixaDestroy(&pixa);
                pixDestroy(&pixd);
            }
        }
    }

    boxDestroy(&box);
    pixDestroy(&pix);
    pixDestroy(&pixs);
    regTestCleanup(rp);
    return 0;
}
コード例 #3
0
ファイル: TestUnitsFormatter.cpp プロジェクト: Advi42/XCSoar
int
main(int argc, char **argv)
{
  plan_tests(205);

  TestAltitude();
  TestRelativeAltitude();
  TestDistance();
  TestSmallDistance();
  TestDistanceSmart();
  TestSpeed();
  TestVerticalSpeed();
  TestTemperature();
  TestPressure();

  return exit_status();
}
コード例 #4
0
ファイル: TestPlane.cpp プロジェクト: llazarus1/YAGE
void TestPlane::RunTests() {
    SmokeTest();
    TestDistance();
    TestNormalize();
}