Changeset 20606 in vbox
- Timestamp:
- Jun 15, 2009 11:49:07 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 48658
- Location:
- trunk/src/VBox/Runtime/testcase
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/testcase/tstFork.cpp
r18991 r20606 51 51 * Init the runtime and stuff. 52 52 */ 53 int rc;54 53 RTTEST hTest; 55 if ( RT_FAILURE(rc = RTR3Init()) 56 || RT_FAILURE(rc = RTTestCreate("tstFork", &hTest))) 57 { 58 RTPrintf("tstFork: fatal initialization error: %Rrc\n", rc); 59 return 1; 60 } 54 int rc = RTTestInitAndCreate("tstFork", &hTest); 55 if (rc) 56 return rc; 61 57 RTTestBanner(hTest); 62 58 -
trunk/src/VBox/Runtime/testcase/tstPath.cpp
r20101 r20606 50 50 * Init RT+Test. 51 51 */ 52 int rc = RTR3Init();53 if (RT_FAILURE(rc))54 return 1;55 56 52 RTTEST hTest; 57 rc = RTTestCreate("tstPath", &hTest);58 if ( RT_FAILURE(rc))59 return 1;53 int rc = RTTestInitAndCreate("tstPath", &hTest); 54 if (rc) 55 return rc; 60 56 RTTestBanner(hTest); 61 57 -
trunk/src/VBox/Runtime/testcase/tstR0ThreadPreemptionDriver.cpp
r19970 r20606 56 56 * Init. 57 57 */ 58 int rc = RTR3InitAndSUPLib();59 if (RT_FAILURE(rc))60 {61 RTPrintf("tstR0ThreadPreemption: fatal error: RTR3InitAndSUPLib failed with rc=%Rrc\n", rc);62 return 1;63 }64 65 58 RTTEST hTest; 66 rc = RTTestCreate("tstR0ThreadPreemption", &hTest); 67 if (RT_FAILURE(rc)) 68 { 69 RTPrintf("tstR0ThreadPreemption: fatal error: RTTestCreate failed with rc=%Rrc\n", rc); 70 return 1; 71 } 59 int rc = RTTestInitAndCreate("tstR0ThreadPreemption", &hTest); 60 if (rc) 61 return rc; 72 62 RTTestBanner(hTest); 73 63 -
trunk/src/VBox/Runtime/testcase/tstRTAvl.cpp
r19945 r20606 1029 1029 * Init. 1030 1030 */ 1031 int rc = RTR3Init();1032 if (RT_FAILURE(rc))1033 return 1;1034 1035 1031 RTTEST hTest; 1036 rc = RTTestCreate("tstRTAvl", &hTest); 1037 if (RT_FAILURE(rc)) 1038 return 1; 1032 int rc = RTTestInitAndCreate("tstRTAvl", &hTest); 1033 if (rc) 1034 return rc; 1035 RTTestBanner(hTest); 1039 1036 g_hTest = hTest; 1040 RTTestBanner(hTest);1041 1037 1042 1038 rc = RTRandAdvCreateParkMiller(&g_hRand); -
trunk/src/VBox/Runtime/testcase/tstRTBase64.cpp
r19947 r20606 111 111 int main() 112 112 { 113 int rc = RTR3Init();114 if (RT_FAILURE(rc))115 return 1;116 113 RTTEST hTest; 117 rc = RTTestCreate("tstRTBase64", &hTest);118 if ( RT_FAILURE(rc))119 return 1;114 int rc = RTTestInitAndCreate("tstRTBase64", &hTest); 115 if (rc) 116 return rc; 120 117 RTTestBanner(hTest); 121 118 -
trunk/src/VBox/Runtime/testcase/tstRTBitOperations.cpp
r19948 r20606 130 130 */ 131 131 RTTEST hTest; 132 if ( RT_FAILURE(RTR3Init()) 133 || RT_FAILURE(RTTestCreate("tstRTBitOperations", &hTest))) 134 { 135 RTPrintf("tstRTBitOperations: fatal initialization error\n"); 136 return 1; 137 } 132 int rc = RTTestInitAndCreate("tstRTBitOperations", &hTest); 133 if (rc) 134 return rc; 138 135 RTTestBanner(hTest); 139 136 -
trunk/src/VBox/Runtime/testcase/tstRTCidr.cpp
r19950 r20606 65 65 int main() 66 66 { 67 int rc = RTR3Init();68 if (RT_FAILURE(rc))69 return 1;70 67 RTTEST hTest; 71 rc = RTTestCreate("tstRTCidr", &hTest);72 if ( RT_FAILURE(rc))73 return 1;68 int rc = RTTestInitAndCreate("tstRTCidr", &hTest); 69 if (rc) 70 return rc; 74 71 RTTestBanner(hTest); 75 72 -
trunk/src/VBox/Runtime/testcase/tstRTCritSect.cpp
r19954 r20606 458 458 int main(int argc, char **argv) 459 459 { 460 int rc = RTR3Init();461 if (RT_FAILURE(rc))462 return 1;463 460 RTTEST hTest; 464 461 #ifndef TRY_WIN32_CRT 465 rc = RTTestCreate("tstRTCritSect", &hTest);462 int rc = RTTestInitAndCreate("tstRTCritSect", &hTest); 466 463 #else 467 rc = RTTestCreate("tstRTCritSectW32", &hTest);464 int rc = RTTestInitAndCreate("tstRTCritSectW32", &hTest); 468 465 #endif 469 if (RT_FAILURE(rc)) 470 return 1; 466 if (rc) 467 return rc; 468 RTTestBanner(hTest); 471 469 g_hTest = hTest; 472 RTTestBanner(hTest);473 470 474 471 /* parse args. */ -
trunk/src/VBox/Runtime/testcase/tstRTMemPool.cpp
r20575 r20606 299 299 int main() 300 300 { 301 int rc = RTR3Init();302 if (RT_FAILURE(rc))303 return 1;304 301 RTTEST hTest; 305 rc = RTTestCreate("tstRTMemPool", &hTest); 306 if (RT_FAILURE(rc)) 307 return 1; 302 int rc = RTTestInitAndCreate("tstRTMemPool", &hTest); 303 if (rc) 304 return rc; 305 RTTestBanner(hTest); 308 306 g_hTest = hTest; 309 RTTestBanner(hTest);310 307 311 308 /* -
trunk/src/VBox/Runtime/testcase/tstRTS3.cpp
r20110 r20606 182 182 * Initialize IPRT and create the test. 183 183 */ 184 int rc = RTR3Init();185 if (RT_FAILURE(rc))186 return 1;187 184 RTTEST hTest; 188 rc = RTTestCreate("tstRTS3", &hTest);189 if ( RT_FAILURE(rc))190 return 1;185 int rc = RTTestInitAndCreate("tstRTS3", &hTest); 186 if (rc) 187 return rc; 191 188 RTTestBanner(hTest); 192 189 -
trunk/src/VBox/Runtime/testcase/tstRTTemp.cpp
r20111 r20606 100 100 int main() 101 101 { 102 int rc = RTR3Init();103 if (RT_FAILURE(rc))104 return 1;105 102 RTTEST hTest; 106 rc = RTTestCreate("tstRTTemp", &hTest);107 if ( RT_FAILURE(rc))108 return 1;103 int rc = RTTestInitAndCreate("tstRTTemp", &hTest); 104 if (rc) 105 return rc; 109 106 RTTestBanner(hTest); 110 107 -
trunk/src/VBox/Runtime/testcase/tstStrFormat.cpp
r20600 r20606 66 66 int main() 67 67 { 68 int rc = RTR3Init(); 69 if (RT_FAILURE(rc)) 70 return 1; 71 RTTEST hTest; 72 rc = RTTestCreate("tstStrFormat", &hTest); 73 if (RT_FAILURE(rc)) 74 return 1; 68 RTTEST hTest; 69 int rc = RTTestInitAndCreate("tstStrFormat", &hTest); 70 if (rc) 71 return rc; 75 72 RTTestBanner(hTest); 76 73 … … 129 126 pszBuf, szCorrect); 130 127 131 /* 128 /* 132 129 * allocation 133 130 */ … … 389 386 RTStrFormatNumber(pszBuf, 100000, 10, 0, 0, RTSTR_F_THOUSAND_SEP); CHECKSTR("100 000"); memset(pszBuf, '!', BUF_SIZE); 390 387 RTStrFormatNumber(pszBuf, 1000000, 10, 0, 0, RTSTR_F_THOUSAND_SEP); CHECKSTR("1 000 000"); memset(pszBuf, '!', BUF_SIZE); 391 388 392 389 CHECK42("%'u", 1, "1"); 393 390 CHECK42("%'u", 10, "10"); -
trunk/src/VBox/Runtime/testcase/tstTermCallbacks.cpp
r19897 r20606 81 81 int main(int argc, char **argv) 82 82 { 83 int rc;84 83 RTTEST hTest; 85 if ( RT_FAILURE(rc = RTR3Init()) 86 || RT_FAILURE(rc = RTTestCreate("tstTermCallback", &hTest))) 87 { 88 RTPrintf("tstTermCallbacks: RTR3Init or RTTestCreate failed: %Rrc\n", rc); 89 return 1; 90 } 84 int rc = RTTestInitAndCreate("tstTermCallback", &hTest); 85 if (rc) 86 return rc; 91 87 RTTestBanner(hTest); 92 88 -
trunk/src/VBox/Runtime/testcase/tstUtf8.cpp
r18847 r20606 43 43 #include <iprt/test.h> 44 44 45 #include <stdlib.h> 45 #include <stdlib.h> /** @todo use our random. */ 46 46 47 47 … … 929 929 { 930 930 /* 931 * Init the runtime and stuff.931 * Init the runtime, test and say hello. 932 932 */ 933 933 RTTEST hTest; 934 if ( RT_FAILURE(RTR3Init()) 935 || RT_FAILURE(RTTestCreate("tstUtf8", &hTest))) 936 { 937 RTPrintf("tstBitstUtf8: fatal initialization error\n"); 938 return 1; 939 } 934 int rc = RTTestInitAndCreate("tstUtf8", &hTest); 935 if (rc) 936 return rc; 940 937 RTTestBanner(hTest); 941 938 939 /* 940 * Run the test. 941 */ 942 942 InitStrings(); 943 943 test1(hTest); … … 953 953 return RTTestSummaryAndDestroy(hTest); 954 954 } 955 -
trunk/src/VBox/Runtime/testcase/tstUuid.cpp
r19205 r20606 43 43 int main(int argc, char **argv) 44 44 { 45 int rc;46 45 RTTEST hTest; 47 if ( RT_FAILURE(rc = RTR3Init()) 48 || RT_FAILURE(rc = RTTestCreate("tstUuid", &hTest))) 49 { 50 RTPrintf("tstUuid: RTR3Init or RTTestCreate failed: %Rrc\n", rc); 51 return 1; 52 } 46 int rc = RTTestInitAndCreate("tstUuid", &hTest); 47 if (rc) 48 return rc; 53 49 RTTestBanner(hTest); 54 50
Note:
See TracChangeset
for help on using the changeset viewer.