Changeset 62722 in vbox for trunk/src/VBox/Runtime/testcase
- Timestamp:
- Jul 30, 2016 12:00:14 AM (8 years ago)
- Location:
- trunk/src/VBox/Runtime/testcase
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/testcase/tstPrfRT.cpp
r62571 r62722 71 71 AssertCompile(((cIterations) % 8) == 0); \ 72 72 /* Min and max value. */ \ 73 for (i = 0, u64MinTS = ~0, u64MaxTS = 0; i < (cIterations); i++) \73 for (i = 0, u64MinTS = UINT64_MAX, u64MaxTS = 0; i < (cIterations); i++) \ 74 74 { \ 75 75 { preexpr } \ … … 124 124 125 125 # define ITERATE(preexpr, expr, postexpr, cIterations) \ 126 for (i = 0, u64TotalTS = 0, u64MinTS = ~0, u64MaxTS = 0; i < (cIterations); i++) \126 for (i = 0, u64TotalTS = 0, u64MinTS = UINT64_MAX, u64MaxTS = 0; i < (cIterations); i++) \ 127 127 { \ 128 128 { preexpr } \ … … 151 151 uint64_t u64MinTS; 152 152 uint64_t u64MaxTS; 153 u nsignedi;153 uint32_t i; 154 154 155 155 RTEXITCODE rcExit = RTTestInitExAndCreate(argc, &argv, argc == 2 ? RTR3INIT_FLAGS_SUPLIB : 0, "tstRTPrf", &g_hTest); … … 161 161 * RTTimeNanoTS, RTTimeProgramNanoTS, RTTimeMilliTS, and RTTimeProgramMilliTS. 162 162 */ 163 ITERATE(RT_NOTHING, RTTimeNanoTS();, RT_NOTHING, _ 1M * 32);163 ITERATE(RT_NOTHING, RTTimeNanoTS();, RT_NOTHING, _32M); 164 164 PrintResult(u64TotalTS, u64MaxTS, u64MinTS, i, "RTTimeNanoTS"); 165 165 166 ITERATE(RT_NOTHING, RTTimeProgramNanoTS();, RT_NOTHING, 1000000);166 ITERATE(RT_NOTHING, RTTimeProgramNanoTS();, RT_NOTHING, UINT32_C(1000000)); 167 167 PrintResult(u64TotalTS, u64MaxTS, u64MinTS, i, "RTTimeProgramNanoTS"); 168 168 169 ITERATE(RT_NOTHING, RTTimeMilliTS();, RT_NOTHING, 1000000);169 ITERATE(RT_NOTHING, RTTimeMilliTS();, RT_NOTHING, UINT32_C(1000000)); 170 170 PrintResult(u64TotalTS, u64MaxTS, u64MinTS, i, "RTTimeMilliTS"); 171 171 172 ITERATE(RT_NOTHING, RTTimeProgramMilliTS();, RT_NOTHING, 1000000);172 ITERATE(RT_NOTHING, RTTimeProgramMilliTS();, RT_NOTHING, UINT32_C(1000000)); 173 173 PrintResult(u64TotalTS, u64MaxTS, u64MinTS, i, "RTTimeProgramMilliTS"); 174 174 … … 177 177 */ 178 178 RTTIMESPEC Time; 179 ITERATE(RT_NOTHING, RTTimeNow(&Time);, RT_NOTHING, 1000000);179 ITERATE(RT_NOTHING, RTTimeNow(&Time);, RT_NOTHING, UINT32_C(1000000)); 180 180 PrintResult(u64TotalTS, u64MaxTS, u64MinTS, i, "RTTimeNow"); 181 181 … … 183 183 * RTLogDefaultInstance() 184 184 */ 185 ITERATE(RT_NOTHING, RTLogDefaultInstance();, RT_NOTHING, 1000000);185 ITERATE(RT_NOTHING, RTLogDefaultInstance();, RT_NOTHING, UINT32_C(1000000)); 186 186 PrintResult(u64TotalTS, u64MaxTS, u64MinTS, i, "RTLogDefaultInstance"); 187 187 … … 189 189 * RTThreadSelf and RTThreadNativeSelf 190 190 */ 191 ITERATE(RT_NOTHING, RTThreadSelf();, RT_NOTHING, 1000000);191 ITERATE(RT_NOTHING, RTThreadSelf();, RT_NOTHING, UINT32_C(1000000)); 192 192 PrintResult(u64TotalTS, u64MaxTS, u64MinTS, i, "RTThreadSelf"); 193 193 194 ITERATE(RT_NOTHING, RTThreadNativeSelf();, RT_NOTHING, 1000000);194 ITERATE(RT_NOTHING, RTThreadNativeSelf();, RT_NOTHING, UINT32_C(1000000)); 195 195 PrintResult(u64TotalTS, u64MaxTS, u64MinTS, i, "RTThreadNativeSelf"); 196 196 … … 199 199 * Registers vs stack. 200 200 */ 201 ITERATE(RT_NOTHING, tstRTPRfARegisterAccess();, RT_NOTHING, 1000);201 ITERATE(RT_NOTHING, tstRTPRfARegisterAccess();, RT_NOTHING, UINT32_C(1000)); 202 202 uint64_t const cRegTotal = u64TotalTS; 203 203 //PrintResult(u64TotalTS, u64MaxTS, u64MinTS, i, "Register only algorithm"); 204 204 205 ITERATE(RT_NOTHING, tstRTPRfAMemoryAccess();, RT_NOTHING, 1000);205 ITERATE(RT_NOTHING, tstRTPRfAMemoryAccess();, RT_NOTHING, UINT32_C(1000)); 206 206 uint64_t const cMemTotal = u64TotalTS; 207 207 //PrintResult(u64TotalTS, u64MaxTS, u64MinTS, i, "Memory only algorithm"); 208 208 209 ITERATE(RT_NOTHING, tstRTPRfAMemoryUnalignedAccess();, RT_NOTHING, 1000);209 ITERATE(RT_NOTHING, tstRTPRfAMemoryUnalignedAccess();, RT_NOTHING, UINT32_C(1000)); 210 210 uint64_t const cMemUnalignedTotal = u64TotalTS; 211 211 //PrintResult(u64TotalTS, u64MaxTS, u64MinTS, i, "Memory only algorithm"); -
trunk/src/VBox/Runtime/testcase/tstSemPingPong.cpp
r62571 r62722 52 52 RT_NOREF_PV(hThread); 53 53 54 int rc ;54 int rc = VINF_SUCCESS; /* (MSC powers of deduction are rather weak. sigh) */ 55 55 PRTPINGPONG pPP = (PRTPINGPONG)pvPP; 56 56 for (uint32_t i = 0; i < TSTSEMPINGPONG_ITERATIONS; i++) -
trunk/src/VBox/Runtime/testcase/tstUtf8.cpp
r62477 r62722 1038 1038 do { \ 1039 1039 const char *pszRet = expr; \ 1040 if ( (pszRet != NULL && (expect) == NULL) \ 1041 || (pszRet == NULL && (expect) != NULL) \ 1042 || strcmp(pszRet, (expect)) \ 1040 const char *pszExpect = (expect); \ 1041 if ( (pszRet != NULL && pszExpect == NULL) \ 1042 || (pszRet == NULL && pszExpect != NULL) \ 1043 || strcmp(pszRet, pszExpect) \ 1043 1044 ) \ 1044 RTTestFailed(hTest, "%d: %#x -> %s expected %s", __LINE__, #expr, pszRet, (expect)); \1045 RTTestFailed(hTest, "%d: %#x -> %s expected %s", __LINE__, #expr, pszRet, pszExpect); \ 1045 1046 } while (0) 1046 1047
Note:
See TracChangeset
for help on using the changeset viewer.