예제 #1
0
int main (void)
{
    unsigned long T;

    /* Show info at start */
    ShowInfo ();

    /* Remember the time */
    T = clock ();

    /* Do the tests */
    Test1 ();
    Test2 ();
    Test3 ();
    Test4 ();
    Test5 ();
    Test6 ();

    /* Calculate the time and print it */
    T = clock () - T;
    printf ("Time needed: %lu ticks\n", T);

    /* Done */
    return EXIT_SUCCESS;
}
예제 #2
0
void Test(void *)
{
  TestRealloc();
  Test3();
  
  Test1<10, true, 100>(); 
  Test1<100, true, 100>();
  Test1<1000, true, 100>();
  Test1<10000, true, 100>();
  Test1<10, true, 100>();
  Test1<100, true, 100>();
  Test1<1000, true, 100>();
  Test1<10000, true, 100>();
  Test1<10, false, 100>();
  Test1<100, false, 100>();
  Test1<1000, false, 100>();
  Test1<10, false, 100>();
  Test1<100, false, 100>();
  Test1<1000, false, 100>();

  TestSTL();
  TestSTL();
  TestSTL2();
  TestSTL2();

  TestRealloc();
}
예제 #3
0
파일: test.cpp 프로젝트: highfestiva/life
int main( int argc, char* argv[] )
{
#ifdef WIN32
    WSAData wsaData;
    int code = WSAStartup(MAKEWORD(1, 1), &wsaData);
	if( code != 0 )
	{
		printf("s***e. %d\n",code);
		return 0;
	}
#endif //WIN32
	try
	{
		Test1();
		Test2();
		Test3();
	}

	catch( happyhttp::Wobbly& e )
	{
		printf("Exception:\n%s\n", e.what() );
	}
	
#ifdef WIN32
    WSACleanup();
#endif // WIN32

	return 0;
}
예제 #4
0
void Test3(JNIEnv *env, jobject obj)
{
    if(!no_opt)
        Test3(env, obj);

    fprintf(stderr, "thread - pure native Test3\n");
    jclass clazz = env->GetObjectClass(obj);
    if (!clazz)
    {
        fprintf(stderr, "\tnative: pure native Test3: GetObjectClass failed\n");
        return;
    }

    jmethodID mid = env->GetStaticMethodID(clazz, "sleep", "(J)V");
    if (!mid)
    {
        fprintf(stderr, "\tnative: pure native Test3: GetStaticMethodID for 'sleep' failed\n");
        return;
    }

    g_resume_agent_thread = 1;
    while(!g_stop_thread)
    {
        SLEEP_UNIVERSAL(100);
//        env->CallStaticVoidMethod(clazz, mid, 500);
    }

    counter++;
    return;
}
예제 #5
0
파일: main.cpp 프로젝트: embpgp/cplusplus
int main(int argc, char *argv[])
{
	Test1();
	Test2();
	Test3();
	return 0;
}
예제 #6
0
파일: main.cpp 프로젝트: raozhizhen/JMSort
int main(int argc, const char * argv[]) {
//      Test1();
//    Test2();
    Test3();
    return 0;
    return 0;
}
예제 #7
0
int _tmain(int argc, _TCHAR* argv[])
{
	Test1();
	Test2();
	Test3();
	return 0;
}
예제 #8
0
파일: test.cpp 프로젝트: comedly/liu153
int main()
{
	//Test1();
	//Test2();
	Test3();
	system("pause");
	return 0;
}
int main() {
    Test1();
    Test2();
    Test3();
    EmptyTest();
    TestSpawnTeleport();
    return 0;
}
예제 #10
0
void Test2(JNIEnv *env, jobject obj)
{
    if(!no_opt)
        Test2(env, obj);

    fprintf(stderr, "thread - pure native Test2\n");
    return Test3(env, obj);
}
예제 #11
0
int main(int argc,char **argv)
{
	Test1();
	Test2();
	Test3();
	Test4();
	Test5();
}
int main()
{
	Test1();
	Test2();
	Test3();
	Test4();

	return 0;
}
예제 #13
0
int main(int argc, char **argv)
{
    int rc = RTTestInitAndCreate("tstRTSemRW", &g_hTest);
    if (rc)
        return 1;
    RTTestBanner(g_hTest);

    if (Test1())
    {
        RTCPUID cCores = RTMpGetOnlineCoreCount();
        if (argc == 1)
        {
            Test2();
            Test3();

            /*    threads, seconds, writePercent,  yield,  quiet */
            Test4(      1,       1,            0,   true,  false);
            Test4(      1,       1,            1,   true,  false);
            Test4(      1,       1,            5,   true,  false);
            Test4(      2,       1,            3,   true,  false);
            Test4(     10,       1,            5,   true,  false);
            Test4(     10,      10,           10,  false,  false);

            if (cCores > 1)
            {
                RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "benchmarking (%u CPU cores)...\n", cCores);
                for (unsigned cThreads = 1; cThreads < 32; cThreads++)
                    Test4(cThreads,  2,            1,  false,   true);
            }
            else
                RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "skipping benchmarking (only %u CPU core available)\n", cCores);

            /** @todo add a testcase where some stuff times out. */
        }
        else
        {
            if (cCores > 1)
            {
                /*    threads, seconds, writePercent,  yield,  quiet */
                RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "benchmarking...\n");
                Test4(      1,       3,            1,  false,   true);
                Test4(      1,       3,            1,  false,   true);
                Test4(      1,       3,            1,  false,   true);
                Test4(      2,       3,            1,  false,   true);
                Test4(      2,       3,            1,  false,   true);
                Test4(      2,       3,            1,  false,   true);
                Test4(      3,       3,            1,  false,   true);
                Test4(      3,       3,            1,  false,   true);
                Test4(      3,       3,            1,  false,   true);
            }
            else
                RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "skipping benchmarking (only %u CPU core available)\n", cCores);
        }
    }

    return RTTestSummaryAndDestroy(g_hTest);
}
int main(int argc, char* argv[])
{
    Test1();
    Test2();
    Test3();
    Test4();
    Test5();
    Test6();
}
예제 #15
0
int main()
{
	w.SetTimeScale(TimeScale::MILLI);
	// Test suites
	Test1();
	Test2();
	Test3();
	Test4();
	return 0;
}
예제 #16
0
int main(int agrc, char* argv[])
{
    Test1();
    Test2();
    Test3();
    Test4();
    Test5();
    Test6();
    Test7();
    
    return 0;
}
예제 #17
0
파일: test_fork.c 프로젝트: barak/systrace
int
main(void)
{
	Test0();
	Test1();
	Test2();
	Test3();
#ifdef CLONE_THREAD
	Test4();
#endif       
        exit(0);
}
예제 #18
0
bool Test()
{
	if( Test1() ) return true;

	if( Test2() ) return true;

	// This problem was reported by Jeff Slutter. Apparently the garbage collector is trying  
	// to execute the destructor of an object whose module has already been discarded.
	if( Test3() ) return true;

	return false;
}
예제 #19
0
파일: Program.c 프로젝트: duarten/UThreadMP
int main (
    )
{
    UtInit();

    Test1();
    Test2();
    Test3();

    getchar();
    return 0;
}
예제 #20
0
int main(int, char** argv)
{
    verbose = getenv("PEGASUS_TEST_VERBOSE") ? true : false;

    Test1();
    Test2();
    Test3();
    Test4();

    cout << argv[0] << " +++++ passed all tests" << endl;

    return(0);
}
예제 #21
0
int _tmain(int argc, _TCHAR* argv[])
{
    Test1();
    Test2();
    Test3();
    Test4();
    Test5();
    Test6();
    Test7();
    Test8();

    return 0;
}
예제 #22
0
GLDEF_C void CallTestsDefaultL(TInt aDrive)
//
// Call tests that may leave
//
	{
	Test0(test);
	Test1();		
	Test2();
	Test3();
	Test4();
	Test5();
	MultipleSessions(aDrive,test);
	}
HRESULT CTestMessageHandler::Run()
{
    
    HRESULT hr = S_OK;

    Chk(Test1());
    Chk(Test2());
    Chk(Test3());
    Chk(Test4());
    
Cleanup:
    return hr;
}
예제 #24
0
int main ()
{

    printf ("Test Case 1\n");
    Test1 ();

    printf ("Test Case 2\n");
    Test2 ();

    printf ("Test Case 3\n");
    Test3 ();
    return 0;
}
예제 #25
0
int main()
{
    Test1();
    Test2();
    Test3();
    Test4();
    Test5();
    Test6();
    Test7();
    Test8();

    return 0;
}
예제 #26
0
// constructor
Test::Test()
{
    Test1();
    Test2();
    Test3();
    Test4();
    Test5();
    Test6();
    Test7();
    Test8();
    Test9();
    Test10();
    Test11();
}
예제 #27
0
void TestMain::RunTests()
{
	PrepareTest();
	Test1();
	TeardownTest();

	PrepareTest();
	Test2();
	TeardownTest();

	PrepareTest();
	Test3();
	TeardownTest();
}
int main(int argc, char* argv[])
{
    Test1();
    Test2();
    Test3();
    Test4();
    Test5();
    Test6();
    Test7();
    Test8();
    Test9();
    Test10();
        
    return 0;
}
예제 #29
0
GLDEF_C void TestTDes<T,S,L,R>::test_TPtrC()
//
// Test the TDesC class special member functions
//
	{

 	test.Start(_L("Invariant for null pointer descriptor"));
 	TestP();
	test.Next(_L("R/O view over constant string"));
	Test1();
	test.Next(_L("R/O view over constant descriptor"));
	Test2();
	test.Next(_L("R/O view over constant buffer with length"));
	Test3();
	}
예제 #30
0
int main( int argc, char *argv[] )
{
    glutInit( &argc, argv );
    glutInitWindowPosition( 0, 0 );
    glutInitWindowSize( 50, 50 );
    glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
    glutCreateWindow(argv[0]);
    glutReshapeFunc( Reshape );
    glutKeyboardFunc( Key );
    glutDisplayFunc( Display );
    Test1();
    Test2();
    Test3();
    glutMainLoop();
    return 0;
}