void teardown() { MallocFailureInject_Restore(); ListFile_Free(m_pListFile); LONGS_EQUAL(noException, getExceptionCode()); printfSpy_Unhook(); }
void extractExceptionCode(const boost::exception& x, std::string& parseMessage) { ExceptionCode code = getExceptionCode(x); parseMessage += " (Code "; parseMessage += toString(code); parseMessage += " = "; parseMessage += toString(code); parseMessage += ")"; }
void validateException(int expectedExceptionCode) { if (expectedExceptionCode == noException) { CHECK_FALSE(m_exceptionThrown); } else { CHECK_TRUE(m_exceptionThrown); } LONGS_EQUAL(expectedExceptionCode, getExceptionCode()); }
void teardown() { LONGS_EQUAL(noException, getExceptionCode()); MallocFailureInject_Restore(); printfSpy_Unhook(); DiskImage_Free((DiskImage*)m_pDiskImage); if (m_pFile) fclose(m_pFile); free(m_pImageOnDisk); remove(g_imageFilename); remove(g_savFilenameAllOnes); remove(g_savFilenameAllZeroes); remove(g_usrFilenameAllOnes); remove(g_imgTableFilename); remove(g_scriptFilename); }
__throws void BinaryBuffer_ProcessWriteFileQueue(BinaryBuffer* pThis) { FileWriteEntry* pEntry = pThis->pFileWriteHead; int exceptionThrown = noException; while (pEntry) { __try writeEntryToDisk(pEntry); __catch exceptionThrown = getExceptionCode(); pEntry = pEntry->pNext; } if (exceptionThrown != noException) __throw(exceptionThrown); }
void validateExceptionThrown(int expectedExceptionCode) { LONGS_EQUAL(expectedExceptionCode, getExceptionCode()); clearExceptionCode(); }
void teardown() { LONGS_EQUAL(noException, getExceptionCode()); }
void validateNoExceptionThrown() { CHECK_FALSE ( m_exceptionThrown ); LONGS_EQUAL ( 0, getExceptionCode() ); }
void validateExceptionCode(int expectedExceptionCode) { m_expectedException = expectedExceptionCode; LONGS_EQUAL ( expectedExceptionCode, getExceptionCode() ); }
void teardown() { LONGS_EQUAL ( m_expectedException, getExceptionCode() ); clearExceptionCode(); platformMock_Uninit(); }
void teardown() { CHECK_EQUAL(noException, getExceptionCode()); StandardIComm_Uninit(m_pComm); ConsoleMock_Uninit(); }
void teardown() { LONGS_EQUAL( m_expectedExceptionCode, getExceptionCode() ); clearExceptionCode(); free(m_pTestString); }
void validateOutOfMemoryExceptionThrown() { LONGS_EQUAL(outOfMemoryException, getExceptionCode()); clearExceptionCode(); POINTERS_EQUAL(NULL, m_pTextSource); }
void teardown() { MallocFailureInject_Restore(); TextSource_FreeAll(); LONGS_EQUAL(noException, getExceptionCode()); }