コード例 #1
0
ファイル: tests.cpp プロジェクト: Paulxia/gpx_tools
int main() {

    GpxFile gpx("data/quandry.gpx");

    qDebug() << "Total distance: " << meter2mile(gpx.length()) << " miles";
    qDebug() << "Total duration: " << formatDuration(gpx.duration());
    qDebug() << "Max speed: " << meterPerSecond2MilePerHour(gpx.maxSpeed()) << " mph";
    qDebug() << "Average speed: " << meterPerSecond2MilePerHour(gpx.averageSpeed()) << " mph";

    qDebug() << "\nNumber of segments: " << gpx.segmentCount();

    for (int i=0; i<gpx.segmentCount(); ++i) {
        qDebug() << "Segment " << (i+1) << " has " <<
            gpx[i].pointCount() << " points, "
            "length " << meter2mile(gpx[i].length()) << " miles, "
            "duration " << formatDuration(gpx[i].duration()) <<
            "max speed of " << meterPerSecond2MilePerHour(gpx[i].maxSpeed()) << " mph, "
            "and average speed of " << meterPerSecond2MilePerHour(gpx[i].averageSpeed()) << " mph";
    }

    testBounds();

    testFuncCallOp();

    testMerge();
    qDebug() << "All tests passed.";
    return 0;
}
コード例 #2
0
int
main( void )
{
    int i;

    if(( i = testInt( )))
        return i;

    if(( i = testStr( )))
        return i;

    if(( i = testParse( )))
        return i;

    if(( i = testJSON( )))
        return i;

    if(( i = testMerge( )))
        return i;

#ifndef WIN32
    i = testStackSmash( 1000000 );
#else
    i = testStackSmash( 100000 );
#endif
    if( i )
        return i;

    return 0;
}
コード例 #3
0
ファイル: test_segment.cpp プロジェクト: AIDman/Kaldi
void TestSegment::testAll()
{
    cout << "- test BasicsAccessor" << endl;
    testBasicAccessor();
    cout << "- test 'Is First/Last Token ?'" << endl;
    testIsFirstOrLastTokenMethod();
    cout << "- test Merge a bunch of Segments" << endl;
    testMerge();
    cout << "- test To Topological structure" << endl;
		testToTopologicalOrderedStruct();
}
コード例 #4
0
ファイル: test.c プロジェクト: phil0s0pher/CS232L_Lab1
int main() {
	testSwap();
	testBuildMaxHeap();
	testMaxHeapify();
	testMerge();
	testBubbleSort();
	testSelectSort();
	testInsertSort();
	testMergeSort();
	testHeapSort();
	return 0;
}
コード例 #5
0
ファイル: test-intervalList.C プロジェクト: bryopsis/trinity
int
main(int argc, char **argv) {

  mt = mtInit(time(NULL));

  test();

  testIntersect(0);
  testIntersect(1);
  testIntersect(2);

  testMerge();

  exit(0);
}
コード例 #6
0
ファイル: MojDbPerfUpdateTest.cpp プロジェクト: KyleMaas/db8
MojErr MojDbPerfUpdateTest::run()
{
	MojErr err = file.open(UpdateTestFileName, MOJ_O_RDWR | MOJ_O_CREAT | MOJ_O_TRUNC, MOJ_S_IRUSR | MOJ_S_IWUSR);
	MojTestErrCheck(err);

	MojString buf;
	err = buf.format("MojoDb Update Performance Test,,,,,\n\nOperation,Kind,Total Time,Time Per Iteration,Time Per Object\n");
	MojTestErrCheck(err);
	err = fileWrite(file, buf);
	MojTestErrCheck(err);

	MojDb db;
	err = db.open(MojDbTestDir);
	MojTestErrCheck(err);

	err = testPut(db);
	MojTestErrCheck(err);
	err = testMerge(db);
	MojTestErrCheck(err);
	err = testUpdateKind(db);
	MojTestErrCheck(err);

	err = MojPrintF("\n\n TOTAL TEST TIME: %llu microseconds\n\n", totalTestTime.microsecs());
	MojTestErrCheck(err);
	err = MojPrintF("\n-------\n");
	MojTestErrCheck(err);

	err = buf.format("\n\nTOTAL TEST TIME,,%llu,,,", totalTestTime.microsecs());
	MojTestErrCheck(err);
	err = fileWrite(file, buf);
	MojTestErrCheck(err);

	err = db.close();
	MojTestErrCheck(err);

	err = file.close();
	MojTestErrCheck(err);

	return MojErrNone;
}
コード例 #7
0
ファイル: sort.cpp プロジェクト: triffon/lecture-notes
int main ()
{
  /*
  int a[10] = {0};
  int x;

  for (int i = 0; i < 10; i++)
  {
    std::cout << "Please enter " << i << "-th number=";
    std::cin >> x;
    insertSorted (a,i,x);
  }

  printArray (a,10);
  */

  testSSSort ();

  testMerge ();


}
コード例 #8
0
ファイル: main.cpp プロジェクト: artemy-kolesnikov/algorithms
int main(int argc, char* argv[]) {
    testMerge();

    return 0;
}