| 334 | } |
| 335 | |
| 336 | int main(int argc, char ** argv) |
| 337 | { |
| 338 | tzset(); |
| 339 | |
| 340 | if (argc < 2) { |
| 341 | fprintf(stderr, "syntax: unittestcpp [unittestdatadir]\n"); |
| 342 | exit(EXIT_FAILURE); |
| 343 | } |
| 344 | |
| 345 | AutoreleasePool * pool = new AutoreleasePool(); |
| 346 | |
| 347 | String * path = String::stringWithUTF8Characters(argv[1]); |
| 348 | MCAssert(path != NULL); |
| 349 | printf("data path: %s\n", MCUTF8(path)); |
| 350 | |
| 351 | testMessageBuilder1(path->stringByAppendingPathComponent(MCSTR("builder"))); |
| 352 | testMessageBuilder2(path->stringByAppendingPathComponent(MCSTR("builder"))); |
| 353 | testMessageBuilder3(path->stringByAppendingPathComponent(MCSTR("builder"))); |
| 354 | testMessageParser(path->stringByAppendingPathComponent(MCSTR("parser"))); |
| 355 | testCharsetDetection(path->stringByAppendingPathComponent(MCSTR("charset-detection"))); |
| 356 | testSummary(path->stringByAppendingPathComponent(MCSTR("summary"))); |
| 357 | testMUTF7(); |
| 358 | |
| 359 | printf("%i tests succeeded, %i tests failed\n", global_success, global_failure); |
| 360 | |
| 361 | pool->release(); |
| 362 | |
| 363 | if (global_failure > 0) { |
| 364 | exit(EXIT_FAILURE); |
| 365 | } |
| 366 | |
| 367 | exit(EXIT_SUCCESS); |
| 368 | } |
nothing calls this directly
no test coverage detected