Changeset 51856 in vbox for trunk/src/VBox/Runtime/testcase
- Timestamp:
- Jul 3, 2014 6:39:21 PM (10 years ago)
- Location:
- trunk/src/VBox/Runtime/testcase
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/testcase/Makefile.kmk
r51820 r51856 241 241 242 242 tstRTDigest-2_TEMPLATE = VBOXR3TSTEXE 243 ifndef VBOX_WITH_ALT_HASH_CODE 244 tstRTDigest-2_DEFS = IPRT_WITHOUT_SHA512T224 IPRT_WITHOUT_SHA512T256 245 endif 243 246 tstRTDigest-2_SOURCES = tstRTDigest-2.cpp 244 247 -
trunk/src/VBox/Runtime/testcase/tstRTDigest-2.cpp
r51838 r51856 154 154 */ 155 155 RTTESTI_CHECK_RC_RETV(RTCrDigestCreateByObjIdString(&hDigest, pszDigestObjId), VINF_SUCCESS); 156 uint32_t c onst cChunks = 64;157 uint32_t 158 int 159 160 uint64_t 156 uint32_t cChunks = 64; 157 uint32_t cLeft = cChunks; 158 int rc = VINF_SUCCESS; 159 160 uint64_t uStartTS = RTTimeNanoTS(); 161 161 while (cLeft-- > 0) 162 162 rc |= RTCrDigestUpdate(hDigest, g_abRandom72KB, sizeof(g_abRandom72KB)); 163 163 rc |= RTCrDigestFinal(hDigest, NULL, 0); 164 164 uint64_t cNsElapsed = RTTimeNanoTS() - uStartTS; 165 166 165 RTTESTI_CHECK(rc == VINF_SUCCESS); 166 167 /* If it was too quick, redo with more chunks. */ 168 if (rc == VINF_SUCCESS && cNsElapsed < 100000000 /* 100 ms */) 169 { 170 cChunks = 1024; 171 cLeft = cChunks; 172 RTTESTI_CHECK_RC(RTCrDigestReset(hDigest), VINF_SUCCESS); 173 174 uStartTS = RTTimeNanoTS(); 175 while (cLeft-- > 0) 176 rc |= RTCrDigestUpdate(hDigest, g_abRandom72KB, sizeof(g_abRandom72KB)); 177 rc |= RTCrDigestFinal(hDigest, NULL, 0); 178 cNsElapsed = RTTimeNanoTS() - uStartTS; 179 RTTESTI_CHECK(rc == VINF_SUCCESS); 180 } 167 181 168 182 RTTestIValueF((uint64_t)cChunks * sizeof(g_abRandom72KB) / _1K / (0.000000001 * cNsElapsed), RTTESTUNIT_KILOBYTES_PER_SEC, … … 917 931 918 932 /** 933 * Tests SHA-224 934 */ 935 static void testSha224(void) 936 { 937 RTTestISub("SHA-224"); 938 939 /* 940 * Some quick direct API tests. 941 */ 942 uint8_t *pabHash = (uint8_t *)RTTestGuardedAllocTail(NIL_RTTEST, RTSHA224_HASH_SIZE); 943 char *pszDigest = (char *)RTTestGuardedAllocTail(NIL_RTTEST, RTSHA224_DIGEST_LEN + 1); 944 const char *pszString; 945 946 pszString = "abc"; 947 RTSha224(pszString, strlen(pszString), pabHash); 948 RTTESTI_CHECK_RC_RETV(RTSha224ToString(pabHash, pszDigest, RTSHA224_DIGEST_LEN + 1), VINF_SUCCESS); 949 CHECK_STRING(pszDigest, "23097d223405d8228642a477bda255b32aadbce4bda0b3f7e36c9da7"); 950 951 952 pszString = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"; 953 RTSha224(pszString, strlen(pszString), pabHash); 954 RTTESTI_CHECK_RC_RETV(RTSha224ToString(pabHash, pszDigest, RTSHA224_DIGEST_LEN + 1), VINF_SUCCESS); 955 CHECK_STRING(pszDigest, "75388b16512776cc5dba5da1fd890150b0c6455cb4f58b1952522525"); 956 957 /* 958 * Generic API tests. 959 */ 960 static TESTRTDIGEST const s_abTests[] = 961 { 962 { RT_STR_TUPLE("abc"), "23097d223405d8228642a477bda255b32aadbce4bda0b3f7e36c9da7", "SHA-224 abc" }, 963 { RT_STR_TUPLE("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"), 964 "75388b16512776cc5dba5da1fd890150b0c6455cb4f58b1952522525", "SHA-224 abcdbc..." }, 965 }; 966 testGeneric("2.16.840.1.101.3.4.2.4", s_abTests, RT_ELEMENTS(s_abTests), "SHA-224"); 967 } 968 969 970 /** 919 971 * Tests SHA-512 920 972 */ … … 1084 1136 1085 1137 1138 #ifndef IPRT_WITHOUT_SHA512T224 1139 /** 1140 * Tests SHA-512/224 1141 */ 1142 static void testSha512t224(void) 1143 { 1144 RTTestISub("SHA-512/224"); 1145 1146 /* 1147 * Some quick direct API tests. 1148 */ 1149 uint8_t abHash[RTSHA512T224_HASH_SIZE]; 1150 char szDigest[RTSHA512T224_DIGEST_LEN + 1]; 1151 const char *pszString; 1152 1153 pszString = "abc"; 1154 RTSha512t224(pszString, strlen(pszString), abHash); 1155 RTTESTI_CHECK_RC_RETV(RTSha512t224ToString(abHash, szDigest, sizeof(szDigest)), VINF_SUCCESS); 1156 CHECK_STRING(szDigest, "4634270f707b6a54daae7530460842e20e37ed265ceee9a43e8924aa"); 1157 1158 pszString = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"; 1159 RTSha512t224(pszString, strlen(pszString), abHash); 1160 RTTESTI_CHECK_RC_RETV(RTSha512t224ToString(abHash, szDigest, sizeof(szDigest)), VINF_SUCCESS); 1161 CHECK_STRING(szDigest, "23fec5bb94d60b23308192640b0c453335d664734fe40e7268674af9"); 1162 1163 /* 1164 * Generic API tests. 1165 */ 1166 static TESTRTDIGEST const s_abTests[] = 1167 { 1168 { RT_STR_TUPLE("abc"), "4634270f707b6a54daae7530460842e20e37ed265ceee9a43e8924aa", "SHA-512/224 abc" }, 1169 { RT_STR_TUPLE("abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"), 1170 "23fec5bb94d60b23308192640b0c453335d664734fe40e7268674af9", "SHA-512/256 abcdef..." }, 1171 }; 1172 testGeneric("2.16.840.1.101.3.4.2.5", s_abTests, RT_ELEMENTS(s_abTests), "SHA-512/224"); 1173 } 1174 #endif /* IPRT_WITHOUT_SHA512T224 */ 1175 1176 #ifndef IPRT_WITHOUT_SHA512T256 1177 /** 1178 * Tests SHA-512/256 1179 */ 1180 static void testSha512t256(void) 1181 { 1182 RTTestISub("SHA-512/256"); 1183 1184 /* 1185 * Some quick direct API tests. 1186 */ 1187 uint8_t abHash[RTSHA512T256_HASH_SIZE]; 1188 char szDigest[RTSHA512T256_DIGEST_LEN + 1]; 1189 const char *pszString; 1190 1191 pszString = "abc"; 1192 RTSha512t256(pszString, strlen(pszString), abHash); 1193 RTTESTI_CHECK_RC_RETV(RTSha512t256ToString(abHash, szDigest, sizeof(szDigest)), VINF_SUCCESS); 1194 CHECK_STRING(szDigest, "53048e2681941ef99b2e29b76b4c7dabe4c2d0c634fc6d46e0e2f13107e7af23"); 1195 1196 pszString = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"; 1197 RTSha512t256(pszString, strlen(pszString), abHash); 1198 RTTESTI_CHECK_RC_RETV(RTSha512t256ToString(abHash, szDigest, sizeof(szDigest)), VINF_SUCCESS); 1199 CHECK_STRING(szDigest, "3928e184fb8690f840da3988121d31be65cb9d3ef83ee6146feac861e19b563a"); 1200 1201 /* 1202 * Generic API tests. 1203 */ 1204 static TESTRTDIGEST const s_abTests[] = 1205 { 1206 { RT_STR_TUPLE("abc"), "53048e2681941ef99b2e29b76b4c7dabe4c2d0c634fc6d46e0e2f13107e7af23", "SHA-512/256 abc" }, 1207 { RT_STR_TUPLE("abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"), 1208 "3928e184fb8690f840da3988121d31be65cb9d3ef83ee6146feac861e19b563a", "SHA-512/256 abcdef..." }, 1209 }; 1210 testGeneric("2.16.840.1.101.3.4.2.6", s_abTests, RT_ELEMENTS(s_abTests), "SHA-512/256"); 1211 } 1212 #endif /* !IPRT_WITHOUT_SHA512T256 */ 1213 1214 /** 1215 * Tests SHA-384 1216 */ 1217 static void testSha384(void) 1218 { 1219 RTTestISub("SHA-384"); 1220 1221 /* 1222 * Some quick direct API tests. 1223 */ 1224 uint8_t abHash[RTSHA384_HASH_SIZE]; 1225 char szDigest[RTSHA384_DIGEST_LEN + 1]; 1226 const char *pszString; 1227 1228 pszString = "abc"; 1229 RTSha384(pszString, strlen(pszString), abHash); 1230 RTTESTI_CHECK_RC_RETV(RTSha384ToString(abHash, szDigest, sizeof(szDigest)), VINF_SUCCESS); 1231 CHECK_STRING(szDigest, "cb00753f45a35e8bb5a03d699ac65007272c32ab0eded1631a8b605a43ff5bed8086072ba1e7cc2358baeca134c825a7"); 1232 1233 pszString = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"; 1234 RTSha384(pszString, strlen(pszString), abHash); 1235 RTTESTI_CHECK_RC_RETV(RTSha384ToString(abHash, szDigest, sizeof(szDigest)), VINF_SUCCESS); 1236 CHECK_STRING(szDigest, "09330c33f71147e83d192fc782cd1b4753111b173b3b05d22fa08086e3b0f712fcc7c71a557e2db966c3e9fa91746039"); 1237 1238 /* 1239 * Generic API tests. 1240 */ 1241 static TESTRTDIGEST const s_abTests[] = 1242 { 1243 { RT_STR_TUPLE("abc"), "cb00753f45a35e8bb5a03d699ac65007272c32ab0eded1631a8b605a43ff5bed8086072ba1e7cc2358baeca134c825a7", "SHA-384 abc" }, 1244 { RT_STR_TUPLE("abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"), 1245 "09330c33f71147e83d192fc782cd1b4753111b173b3b05d22fa08086e3b0f712fcc7c71a557e2db966c3e9fa91746039", "SHA-384 abcdef..." }, 1246 }; 1247 testGeneric("2.16.840.1.101.3.4.2.2", s_abTests, RT_ELEMENTS(s_abTests), "SHA-384"); 1248 } 1249 1086 1250 1087 1251 int main() … … 1097 1261 testSha1(); 1098 1262 testSha256(); 1263 testSha224(); 1099 1264 testSha512(); 1265 testSha384(); 1266 #ifndef IPRT_WITHOUT_SHA512T224 1267 testSha512t224(); 1268 #endif 1269 #ifndef IPRT_WITHOUT_SHA512T256 1270 testSha512t256(); 1271 #endif 1100 1272 1101 1273 return RTTestSummaryAndDestroy(hTest); -
trunk/src/VBox/Runtime/testcase/tstRTDigest.cpp
r51820 r51856 44 44 #include <iprt/string.h> 45 45 #include <iprt/stream.h> 46 #include <iprt/crypto/digest.h> 46 47 47 48 … … 79 80 80 81 82 static char *MyGetNextSignificantLine(PRTSTREAM pFile, char *pszBuf, size_t cbBuf, uint32_t *piLine, int *prc) 83 { 84 for (;;) 85 { 86 *pszBuf = '\0'; 87 int rc = RTStrmGetLine(pFile, pszBuf, cbBuf); 88 if (RT_FAILURE(rc)) 89 { 90 if (rc != VERR_EOF) 91 { 92 Error("Read error: %Rrc", rc); 93 *prc = rc; 94 return NULL; 95 } 96 if (!*pszBuf) 97 return NULL; 98 } 99 *piLine += 1; 100 101 /* Significant? */ 102 char *pszStart = RTStrStrip(pszBuf); 103 if (*pszStart && *pszStart != '#') 104 return pszStart; 105 } 106 } 107 81 108 82 109 int main(int argc, char **argv) … … 84 111 RTR3InitExe(argc, &argv, 0); 85 112 86 enum 87 { 88 kDigestType_NotSpecified, 89 kDigestType_CRC32, 90 kDigestType_CRC64, 91 kDigestType_MD2, 92 kDigestType_MD5, 93 kDigestType_SHA1, 94 kDigestType_SHA256, 95 kDigestType_SHA512 96 } enmDigestType = kDigestType_NotSpecified; 97 const char *pszDigestType = "NotSpecified"; 113 RTDIGESTTYPE enmDigestType = RTDIGESTTYPE_INVALID; 114 const char *pszDigestType = "NotSpecified"; 98 115 99 116 enum … … 101 118 kMethod_Full, 102 119 kMethod_Block, 103 kMethod_File 120 kMethod_File, 121 kMethod_CVAS 104 122 } enmMethod = kMethod_Block; 105 123 … … 129 147 if (!RTStrICmp(ValueUnion.psz, "crc32")) 130 148 { 131 pszDigestType = "CRC32";132 enmDigestType = kDigestType_CRC32;149 pszDigestType = "CRC32"; 150 enmDigestType = RTDIGESTTYPE_CRC32; 133 151 } 134 152 else if (!RTStrICmp(ValueUnion.psz, "crc64")) 135 153 { 136 154 pszDigestType = "CRC64"; 137 enmDigestType = kDigestType_CRC64;155 enmDigestType = RTDIGESTTYPE_CRC64; 138 156 } 139 157 else if (!RTStrICmp(ValueUnion.psz, "md2")) 140 158 { 141 159 pszDigestType = "MD2"; 142 enmDigestType = kDigestType_MD2;160 enmDigestType = RTDIGESTTYPE_MD2; 143 161 } 144 162 else if (!RTStrICmp(ValueUnion.psz, "md5")) 145 163 { 146 164 pszDigestType = "MD5"; 147 enmDigestType = kDigestType_MD5;165 enmDigestType = RTDIGESTTYPE_MD5; 148 166 } 149 167 else if (!RTStrICmp(ValueUnion.psz, "sha1")) 150 168 { 151 169 pszDigestType = "SHA-1"; 152 enmDigestType = kDigestType_SHA1; 170 enmDigestType = RTDIGESTTYPE_SHA1; 171 } 172 else if (!RTStrICmp(ValueUnion.psz, "sha224")) 173 { 174 pszDigestType = "SHA-224"; 175 enmDigestType = RTDIGESTTYPE_SHA224; 153 176 } 154 177 else if (!RTStrICmp(ValueUnion.psz, "sha256")) 155 178 { 156 179 pszDigestType = "SHA-256"; 157 enmDigestType = kDigestType_SHA256; 180 enmDigestType = RTDIGESTTYPE_SHA256; 181 } 182 else if (!RTStrICmp(ValueUnion.psz, "sha384")) 183 { 184 pszDigestType = "SHA-384"; 185 enmDigestType = RTDIGESTTYPE_SHA384; 158 186 } 159 187 else if (!RTStrICmp(ValueUnion.psz, "sha512")) 160 188 { 161 189 pszDigestType = "SHA-512"; 162 enmDigestType = kDigestType_SHA512; 190 enmDigestType = RTDIGESTTYPE_SHA512; 191 } 192 else if (!RTStrICmp(ValueUnion.psz, "sha512/224")) 193 { 194 pszDigestType = "SHA-512/224"; 195 enmDigestType = RTDIGESTTYPE_SHA512T224; 196 } 197 else if (!RTStrICmp(ValueUnion.psz, "sha512/256")) 198 { 199 pszDigestType = "SHA-512/256"; 200 enmDigestType = RTDIGESTTYPE_SHA512T256; 163 201 } 164 202 else … … 176 214 else if (!RTStrICmp(ValueUnion.psz, "file")) 177 215 enmMethod = kMethod_File; 216 else if (!RTStrICmp(ValueUnion.psz, "cvas")) 217 enmMethod = kMethod_CVAS; 178 218 else 179 219 { … … 201 241 case VINF_GETOPT_NOT_OPTION: 202 242 { 203 if (enmDigestType == kDigestType_NotSpecified)243 if (enmDigestType == RTDIGESTTYPE_INVALID) 204 244 return Error("No digest type was specified\n"); 205 245 … … 214 254 switch (enmDigestType) 215 255 { 216 case kDigestType_SHA1:256 case RTDIGESTTYPE_SHA1: 217 257 { 218 258 char *pszDigest; … … 225 265 } 226 266 227 case kDigestType_SHA256:267 case RTDIGESTTYPE_SHA256: 228 268 { 229 269 char *pszDigest; … … 259 299 switch (enmDigestType) 260 300 { 261 case kDigestType_CRC32:301 case RTDIGESTTYPE_CRC32: 262 302 { 263 303 uint32_t uCRC32 = RTCrc32Start(); … … 274 314 } 275 315 276 case kDigestType_CRC64:316 case RTDIGESTTYPE_CRC64: 277 317 { 278 318 uint64_t uCRC64 = RTCrc64Start(); … … 289 329 } 290 330 291 case kDigestType_MD2:331 case RTDIGESTTYPE_MD2: 292 332 { 293 333 RTMD2CONTEXT Ctx; … … 306 346 } 307 347 308 case kDigestType_MD5:348 case RTDIGESTTYPE_MD5: 309 349 { 310 350 RTMD5CONTEXT Ctx; … … 323 363 } 324 364 325 case kDigestType_SHA1:365 case RTDIGESTTYPE_SHA1: 326 366 { 327 367 RTSHA1CONTEXT Ctx; … … 340 380 } 341 381 342 case kDigestType_SHA256:382 case RTDIGESTTYPE_SHA256: 343 383 { 344 384 RTSHA256CONTEXT Ctx; … … 357 397 } 358 398 359 case kDigestType_SHA512:399 case RTDIGESTTYPE_SHA512: 360 400 { 361 401 RTSHA512CONTEXT Ctx; … … 395 435 } 396 436 437 438 /* 439 * Process a SHS response file: 440 * http://csrc.nist.gov/groups/STM/cavp/index.html#03 441 */ 442 case kMethod_CVAS: 443 { 444 RTCRDIGEST hDigest; 445 int rc = RTCrDigestCreateByType(&hDigest, enmDigestType); 446 if (RT_FAILURE(rc)) 447 return Error("Failed to create digest calculator for %s: %Rrc", pszDigestType, rc); 448 449 uint32_t const cbDigest = RTCrDigestGetHashSize(hDigest); 450 if (!cbDigest || cbDigest >= _1K) 451 return Error("Unexpected hash size: %#x\n", cbDigest); 452 453 PRTSTREAM pFile; 454 rc = RTStrmOpen(ValueUnion.psz, "r", &pFile); 455 if (RT_FAILURE(rc)) 456 return Error("Failed to open CVAS file '%s': %Rrc", ValueUnion.psz, rc); 457 458 /* 459 * Parse the input file. 460 * ASSUME order: Len, Msg, MD. 461 */ 462 static char s_szLine[_256K]; 463 char *psz; 464 uint32_t cPassed = 0; 465 uint32_t cErrors = 0; 466 uint32_t iLine = 1; 467 for (;;) 468 { 469 psz = MyGetNextSignificantLine(pFile, s_szLine, sizeof(s_szLine), &iLine, &rc); 470 if (!psz) 471 break; 472 473 /* Skip [L = 20] stuff. */ 474 if (*psz == '[') 475 continue; 476 477 /* Message length. */ 478 uint64_t cMessageBits; 479 if (RTStrNICmp(psz, RT_STR_TUPLE("Len ="))) 480 return Error("%s(%d): Expected 'Len =' found '%.10s...'", ValueUnion.psz, iLine, psz); 481 psz = RTStrStripL(psz + 5); 482 rc = RTStrToUInt64Full(psz, 0, &cMessageBits); 483 if (rc != VINF_SUCCESS) 484 return Error("%s(%d): Error parsing length '%s': %Rrc\n", ValueUnion.psz, iLine, psz, rc); 485 486 /* The message text. */ 487 psz = MyGetNextSignificantLine(pFile, s_szLine, sizeof(s_szLine), &iLine, &rc); 488 if (!psz) 489 return Error("%s(%d): Expected message text not EOF.", ValueUnion.psz, iLine); 490 if (RTStrNICmp(psz, RT_STR_TUPLE("Msg ="))) 491 return Error("%s(%d): Expected 'Msg =' found '%.10s...'", ValueUnion.psz, iLine, psz); 492 psz = RTStrStripL(psz + 5); 493 494 size_t const cbMessage = (cMessageBits + 7) / 8; 495 static uint8_t s_abMessage[sizeof(s_szLine) / 2]; 496 if (cbMessage > 0) 497 { 498 rc = RTStrConvertHexBytes(psz, s_abMessage, cbMessage, 0 /*fFlags*/); 499 if (rc != VINF_SUCCESS) 500 return Error("%s(%d): Error parsing message '%.10s...': %Rrc\n", 501 ValueUnion.psz, iLine, psz, rc); 502 } 503 504 /* The message digest. */ 505 psz = MyGetNextSignificantLine(pFile, s_szLine, sizeof(s_szLine), &iLine, &rc); 506 if (!psz) 507 return Error("%s(%d): Expected message digest not EOF.", ValueUnion.psz, iLine); 508 if (RTStrNICmp(psz, RT_STR_TUPLE("MD ="))) 509 return Error("%s(%d): Expected 'MD =' found '%.10s...'", ValueUnion.psz, iLine, psz); 510 psz = RTStrStripL(psz + 4); 511 512 static uint8_t s_abExpectedDigest[_1K]; 513 rc = RTStrConvertHexBytes(psz, s_abExpectedDigest, cbDigest, 0 /*fFlags*/); 514 if (rc != VINF_SUCCESS) 515 return Error("%s(%d): Error parsing message digest '%.10s...': %Rrc\n", 516 ValueUnion.psz, iLine, psz, rc); 517 518 /* 519 * Do the testing. 520 */ 521 rc = RTCrDigestReset(hDigest); 522 if (rc != VINF_SUCCESS) 523 return Error("RTCrDigestReset failed: %Rrc", rc); 524 525 rc = RTCrDigestUpdate(hDigest, s_abMessage, cbMessage); 526 if (rc != VINF_SUCCESS) 527 return Error("RTCrDigestUpdate failed: %Rrc", rc); 528 529 static uint8_t s_abActualDigest[_1K]; 530 rc = RTCrDigestFinal(hDigest, s_abActualDigest, cbDigest); 531 if (rc != VINF_SUCCESS) 532 return Error("RTCrDigestFinal failed: %Rrc", rc); 533 534 if (memcmp(s_abActualDigest, s_abExpectedDigest, cbDigest) == 0) 535 cPassed++; 536 else 537 { 538 Error("%s(%d): Message digest mismatch. Expected %.*RThxs, got %.*RThxs.", 539 ValueUnion.psz, iLine, cbDigest, s_abExpectedDigest, cbDigest, s_abActualDigest); 540 cErrors++; 541 } 542 } 543 544 RTStrmClose(pFile); 545 if (cErrors > 0) 546 return Error("Failed: %u error%s (%u passed)", cErrors, cErrors == 1 ? "" : "s", cPassed); 547 RTPrintf("Passed %u test%s.\n", cPassed, cPassed == 1 ? "" : "s"); 548 if (RT_FAILURE(rc)) 549 return Error("Failed: %Rrc", rc); 550 break; 551 } 552 397 553 default: 398 554 return Error("Internal error #2\n");
Note:
See TracChangeset
for help on using the changeset viewer.