| 370 | } |
| 371 | |
| 372 | void FailableMemoryAllocator::checkAllFailedAllocsWereDone() |
| 373 | { |
| 374 | if (head_) { |
| 375 | UtestShell* currentTest = UtestShell::getCurrent(); |
| 376 | SimpleString failText; |
| 377 | if (head_->file_) |
| 378 | failText = StringFromFormat("Expected failing alloc at %s:%d was never done", head_->file_, (int) head_->line_); |
| 379 | else |
| 380 | failText = StringFromFormat("Expected allocation number %d was never done", (int) head_->allocNumberToFail_); |
| 381 | |
| 382 | currentTest->failWith(FailFailure(currentTest, currentTest->getName().asCharString(), currentTest->getLineNumber(), failText)); |
| 383 | } |
| 384 | } |
| 385 | |
| 386 | void FailableMemoryAllocator::clearFailedAllocs() |
| 387 | { |
no test coverage detected