| 618 | } |
| 619 | |
| 620 | void MemoryLeakWarningPlugin::postTestAction(UtestShell& test, TestResult& result) |
| 621 | { |
| 622 | memLeakDetector_->stopChecking(); |
| 623 | size_t leaks = memLeakDetector_->totalMemoryLeaks(mem_leak_period_checking); |
| 624 | |
| 625 | if (!ignoreAllWarnings_ && expectedLeaks_ != leaks && failureCount_ == result.getFailureCount()) { |
| 626 | if(MemoryLeakWarningPlugin::areNewDeleteOverloaded()) { |
| 627 | TestFailure f(&test, memLeakDetector_->report(mem_leak_period_checking)); |
| 628 | result.addFailure(f); |
| 629 | } else if(expectedLeaks_ > 0) { |
| 630 | result.print(StringFromFormat("Warning: Expected %d leak(s), but leak detection was disabled", (int) expectedLeaks_).asCharString()); |
| 631 | } |
| 632 | } |
| 633 | memLeakDetector_->markCheckingPeriodLeaksAsNonCheckingPeriod(); |
| 634 | ignoreAllWarnings_ = false; |
| 635 | expectedLeaks_ = 0; |
| 636 | } |
| 637 | |
| 638 | const char* MemoryLeakWarningPlugin::FinalReport(size_t toBeDeletedLeaks) |
| 639 | { |
nothing calls this directly
no test coverage detected