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; }
/** @SYMTestCaseID SYSLIB-SQL-CT-1650 @SYMTestCaseDesc SQL, OS porting layer tests. @SYMTestPriority High @SYMTestActions SQL, OS porting layer tests. @SYMTestExpectedResults Test must not fail @SYMREQ REQ5792 REQ5793 */ void DoTests() { TheTest.Printf(_L("OS porting layer test - create/open/close/delete a file\r\n")); Test1(); TheTest.Printf(_L("OS porting layer test - read/write/seek/truncate\r\n")); Test2(); TheTest.Printf(_L("OS porting layer test - miscellaneous tests\r\n")); Test3(); TheTest.Printf(_L("OS porting layer test - lock/unlock\r\n")); Test5(); TheTest.Printf(_L("OS porting layer test - sqlite3SymbianLibInit() - OOM test\r\n")); sqlite3SymbianLibInitOomTest(); TheTest.Printf(_L("OS porting layer test - sqlite3SymbianLibInit() - 'File I/O error simulation' test\r\n")); sqlite3SymbianLibInitFsErrTest(); TheTest.Printf(_L("OS porting layer test - 'profiler disabled' tests\r\n")); ProfilerDisabledTest(); TheTest.Printf(_L("OS porting layer test - negative tests\r\n")); NegativeTest(); TheTest.Printf(_L("TVfs::Open(<temp file>) OOM test\r\n")); VfsOpenTempFileOomTest(); TheTest.Printf(_L("TVfs::Open(<temp file>) file I/O error simulation test\r\n")); VfsOpenTempFileFileIoErrTest(); TheTest.Printf(_L("TVfs::Open(<'delete on close' file>) OOM test\r\n")); VfsCreateDeleteOnCloseFileOomTest(); #ifdef _DEBUG TheTest.Printf(_L("'An attempt to create the OS layer data again' panic\r\n")); PanicTest(TheOsLayerDataDuplicated, EExitPanic, KSqlitePanicCategory, ESqliteOsPanicOsLayerDataExists); #endif //_DEBUG }
void Test::RunTests() { Test1(); Test2a(); Test2b(); Test3a(); Test3b(); Test4(); Test5(); Test6a(); Test6b(); Test7a(); Test7b(); Test8a(); Test8b(); Test9a(); Test9b(); Test10a(); Test10b(); Test11a(); Test11b(); Test12a(); Test12b(); Test13(); Test14(); Test15a(); Test15b(); Test16(); Test17(); Test18(); }
int main(int argc,char **argv) { Test1(); Test2(); Test3(); Test4(); Test5(); }
int _tmain(int argc, _TCHAR* argv[]) { Test1(); Test2(); Test3(); Test4(); Test5(); return 0; }
int main(int argc, char* argv[]) { Test1(); Test2(); Test3(); Test4(); Test5(); Test6(); }
int main(int argc, char* argv[]) { Test1(); Test2(); Test3(); Test4(); Test5(); return 0; }
void TestFind() { //Test1();//²âÊÔµÚÒ»¸öº¯Êý //Test2(); //Test3(); //Test4(); Test5(); Test6(); }
int main() { Test0(); Test1(); Test2(); Test3(); Test4(); Test5(); Test6(); return 0; }
GLDEF_C void CallTestsDefaultL(TInt aDrive) // // Call tests that may leave // { Test0(test); Test1(); Test2(); Test3(); Test4(); Test5(); MultipleSessions(aDrive,test); }
// constructor Test::Test() { Test1(); Test2(); Test3(); Test4(); Test5(); Test6(); Test7(); Test8(); Test9(); Test10(); Test11(); }
int main(int argc, char* argv[]) { Test1(); Test2(); Test3(); Test4(); Test5(); Test6(); Test7(); Test8(); Test9(); Test10(); return 0; }
int _tmain(int argc, _TCHAR* argv[]) { Test1(); Test2(); Test3(); Test4(); Test5(); Test6(); Test7(); Test8(); Test9(); Test10(); Test11(); return 0; }
void DLCSystemTests::NextTest() { needNextTest = false; delete DLCSystem::Instance(); switch ( state ) { case TEST_1: Logger::Debug( " TEST 1 = %s", (isSucsess) ? "Success" : "Fail" ); Test2(); break; case TEST_2: Logger::Debug( " TEST 2 = %s", (isSucsess) ? "Success" : "Fail" ); Test3(); break; case TEST_3: Logger::Debug( " TEST 3 = %s", (isSucsess) ? "Success" : "Fail" ); Test4(); break; case TEST_4: Logger::Debug( " TEST 4 = %s", (isSucsess) ? "Success" : "Fail" ); Test5(); break; case TEST_5: Logger::Debug( " TEST 5 = %s", (isSucsess) ? "Success" : "Fail" ); Test6(); break; case TEST_6: Logger::Debug( " TEST 6 = %s", (isSucsess) ? "Success" : "Fail" ); Test7(); break; case TEST_7: Logger::Debug( " TEST 7 = %s", (isSucsess) ? "Success" : "Fail" ); Test8(); break; case TEST_8: Logger::Debug( " TEST 8 = %s", (isSucsess) ? "Success" : "Fail" ); isFinished = true; // FileSystem::Instance()->DeleteDirectory( FileSystem::Instance()->SystemPathForFrameworkPath( std::string( "~doc:/downloads/" ) ) ); break; default: break; } }
void DLCSystemTests::NextTest() { needNextTest = false; delete DLCSystem::Instance(); switch ( state ) { case TEST_1: Logger::Debug( " TEST 1 = %s", (isSucsess) ? "Success" : "Fail" ); Test2(); break; case TEST_2: Logger::Debug( " TEST 2 = %s", (isSucsess) ? "Success" : "Fail" ); Test3(); break; case TEST_3: Logger::Debug( " TEST 3 = %s", (isSucsess) ? "Success" : "Fail" ); Test4(); break; case TEST_4: Logger::Debug( " TEST 4 = %s", (isSucsess) ? "Success" : "Fail" ); Test5(); break; case TEST_5: Logger::Debug( " TEST 5 = %s", (isSucsess) ? "Success" : "Fail" ); Test6(); break; case TEST_6: Logger::Debug( " TEST 6 = %s", (isSucsess) ? "Success" : "Fail" ); Test7(); break; case TEST_7: Logger::Debug( " TEST 7 = %s", (isSucsess) ? "Success" : "Fail" ); Test8(); break; case TEST_8: Logger::Debug( " TEST 8 = %s", (isSucsess) ? "Success" : "Fail" ); isFinished = true; break; default: break; } }
int main(int argc, char * argv[]) { int which; emInitLocale(); emEnableDLog(); if (argc>=2) which=atoi(argv[1]); else which=-1; if (which<0 || which==1) Test1(); if (which<0 || which==2) Test2(); if (which<0 || which==3) Test3(); if (which<0 || which==4) Test4(); if (which<0 || which==5) Test5(); if (which<0 || which==6) Test6(); printf("Success\n"); return 0; }
int main(int argc, char *argv[]) { Print = false; offDump(); offNode(); if (true) Test1(); if (true) Test2(); if (true) Test3(); if (true) Test4(); if (true) Test5(); if (true) Test6(); if (true) Test7(); if (true) Test8(); if (true) Test9(); if (true) Test10(); if (true) Test11(); if (true) Test12(); if (true) Test13(); if (true) Test14(); if (true) Test15(); return 0; }
GLDEF_C void TestTDes<T,S,L,R>::test_TPtr() // // Test the TPtr class special member functions // { test.Start(_L("Invariant for null pointer descriptor")); TestP(); test.Next(_L("R/W view over buffer with length & maxlength")); Test4(); test.Next(_L("R/W view over buffer with maxlength")); Test5(); // Skipped the following test because Colly hasn't // written the templates yet for the TBufC8 & 16 classes // test.Next(_L("R/W view over LcbBase with maxlength")); // Test6(); test.Next(_L("String assignment")); TestA(); test.Next(_L("DesW assignment")); TestB(); test.Next(_L("DesC assignment")); TestC(); }
bool TestDataStructuresChild::RecvStart() { puts("[TestDataStructuresChild] starting"); Test1(); Test2(); Test3(); Test4(); Test5(); Test6(); Test7_0(); Test7(); Test8(); Test9(); Test10(); Test11(); Test12(); Test13(); Test14(); Test15(); Test16(); Test17(); if (OtherProcess() != 0) { //FIXME/bug 703317 allocation of nsIntRegion uses a global //region pool which breaks threads Test18(); } for (uint32_t i = 0; i < nactors; ++i) if (!PTestDataStructuresSubChild::Send__delete__(mKids[i])) fail("can't send dtor"); Close(); return true; }
/*---------------------------------------------------------------------- | main +---------------------------------------------------------------------*/ int main(int argc, char** argv) { NPT_COMPILER_UNUSED(argc); NPT_HttpRequestHandler* handler; NPT_Reference<NPT_DataBuffer> buffer; bool result; /* parse command line */ ParseCommandLine(argv); /* create http server */ PLT_HttpServer http_server(Options.port?Options.port:8089); NPT_String url; if (!Options.path.IsEmpty()) { /* extract folder path */ int index1 = Options.path.ReverseFind('\\'); int index2 = Options.path.ReverseFind('/'); if (index1 <= 0 && index2 <=0) { fprintf(stderr, "ERROR: invalid path\n"); exit(1); } NPT_FileInfo info; NPT_CHECK_SEVERE(NPT_File::GetInfo(Options.path, &info)); /* add file request handler */ handler = new NPT_HttpFileRequestHandler( Options.path.Left(index1>index2?index1:index2), "/"); http_server.AddRequestHandler(handler, "/", true); /* build url */ url = "/" + Options.path.SubString((index1>index2?index1:index2)+1); } else { /* create random garbage data */ buffer = new NPT_DataBuffer(32768); buffer->SetDataSize(32768); /* add static handler */ handler = new NPT_HttpStaticRequestHandler(buffer->GetData(), buffer->GetDataSize(), "application/octet-stream"); http_server.AddRequestHandler(handler, "/test"); /* build url */ url = "/test"; } /* add custom handler */ PLT_RingBufferStreamReference ringbuffer_stream(new PLT_RingBufferStream()); NPT_InputStreamReference stream(ringbuffer_stream); NPT_HttpRequestHandler* custom_handler = new PLT_HttpCustomRequestHandler(stream, "text/xml"); http_server.AddRequestHandler(custom_handler, "/custom"); /* start server */ NPT_CHECK_SEVERE(http_server.Start()); /* a task manager for the tests downloader */ PLT_TaskManager task_manager; /* small delay to let the server start */ NPT_System::Sleep(NPT_TimeInterval(1.f)); /* execute tests */ NPT_Size size; NPT_COMPILER_UNUSED(size); #ifdef TEST1 result = Test1(&task_manager, NPT_HttpUrl("127.0.0.1", http_server.GetPort(), url), size); if (!result) return -1; #endif #ifdef TEST2 result = Test2(&task_manager, NPT_HttpUrl("127.0.0.1", http_server.GetPort(), url), size); if (!result) return -1; #endif #ifdef TEST3 result = Test3(&task_manager, NPT_HttpUrl("127.0.0.1", http_server.GetPort(), "/custom"), ringbuffer_stream, size); if (!result) return -1; #endif #ifdef TEST4 result = Test4(&task_manager, NPT_HttpUrl("127.0.0.1", http_server.GetPort(), "/custom"), NPT_TimeInterval(.1f)); if (!result) return -1; result = Test4(&task_manager, NPT_HttpUrl("127.0.0.1", http_server.GetPort(), "/custom"), NPT_TimeInterval(1.f)); if (!result) return -1; result = Test4(&task_manager, NPT_HttpUrl("127.0.0.1", http_server.GetPort(), "/custom"), NPT_TimeInterval(2.f)); if (!result) return -1; #endif #ifdef TEST5 result = Test5(NPT_HttpUrl("127.0.0.1", http_server.GetPort(), "/test")); if (!result) return -1; #endif NPT_System::Sleep(NPT_TimeInterval(1.f)); // abort server tasks that are waiting on ring buffer stream ringbuffer_stream->Abort(); http_server.Stop(); return 0; }
TInt E32Main() { TInt r; test.Title(); test.Start(_L("Starting T_DENYCLAMP ...")); test(TheFs.Connect()==KErrNone); GetDriveLetters(); TBuf<256> pathName; //************************************************************************ // // Test on FAT (writable file system) // //************************************************************************ if(NandFatDrv!='?') { pathName=_L("?:\\CLAMP-TST\\"); // FAT on NAND pathName[0]=(TText)NandFatDrv; r=TheFs.MkDirAll(pathName); test(r==KErrNone || r== KErrAlreadyExists); TheFs.SetSessionPath(pathName); test.Printf( _L("T_DENYCLAMP: testing FAT drive on %C\n"),(TText)NandFatDrv); Test1(); // Basic clamp operation Test2(); // Invalid clamp requests // Test3(pathName);// Denied FS requests when files are clamped - invalid for T_DENYCLAMP r=TheFs.RmDir(pathName); test(r==KErrNone); } else test.Printf( _L("T_DENYCLAMP: FAT drive not tested\n")); //************************************************************************ // // Test on ROFS (non-writable file system) // //************************************************************************ if(RofsDrv!='?') { pathName=_L("?:\\"); pathName[0]=(TText)RofsDrv; TheFs.SetSessionPath(pathName); test.Printf( _L("T_DENYCLAMP: testing ROFS drive on %C\n"),(TText)RofsDrv); Test4(pathName); // Clamp tests for non-writable file system } else test.Printf( _L("T_DENYCLAMP: ROFS drive not tested\n")); //************************************************************************ // // Test on Z: - Composite File System, or ROMFS (non-writable file system) // //************************************************************************ if(CompDrv!='?') { pathName=_L("?:\\TEST\\"); pathName[0]=(TText)CompDrv; TheFs.SetSessionPath(pathName); test.Printf( _L("T_DENYCLAMP: testing Z drive (on %C)\n"),(TText)CompDrv); Test4(pathName); // Clamp tests for non-writable file system } else test.Printf( _L("T_DENYCLAMP: Z drive not tested\n")); //************************************************************************ // // Test on LFFS (non-clampable file system) // //************************************************************************ if(LffsDrv!='?') { TBuf<256> unsuppPath; unsuppPath=_L("?:\\CLAMP-TST\\"); unsuppPath[0]=(TText)LffsDrv; r=TheFs.MkDirAll(unsuppPath); test(r==KErrNone || r== KErrAlreadyExists); TheFs.SetSessionPath(unsuppPath); test.Printf( _L("T_DENYCLAMP: testing LFFS drive on %C\n"),(TText)LffsDrv); Test5(); // Clamp requests on non-clamping file systems } else test.Printf( _L("T_DENYCLAMP: LFFS drive not tested\n")); test.End(); return 0; }