MCPcopy Create free account
hub / github.com/MailCore/mailcore2 / main

Function main

unittest/unittest.cpp:336–368  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

334}
335
336int 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}

Callers

nothing calls this directly

Calls 9

testMessageBuilder1Function · 0.85
testMessageBuilder2Function · 0.85
testMessageBuilder3Function · 0.85
testCharsetDetectionFunction · 0.85
testSummaryFunction · 0.85
testMUTF7Function · 0.85
releaseMethod · 0.80
testMessageParserFunction · 0.70

Tested by

no test coverage detected