Example #1
0
 void teardown()
 {
     MallocFailureInject_Restore();
     ListFile_Free(m_pListFile);
     LONGS_EQUAL(noException, getExceptionCode());
     printfSpy_Unhook();
 }
Example #2
0
void extractExceptionCode(const boost::exception& x, std::string& parseMessage) {
    ExceptionCode code = getExceptionCode(x);

    parseMessage += " (Code ";
    parseMessage += toString(code);
    parseMessage += " = ";
    parseMessage += toString(code);
    parseMessage += ")";
}
Example #3
0
 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);
 }
Example #5
0
__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();
 }
Example #7
0
 void teardown()
 {
     LONGS_EQUAL(noException, getExceptionCode());
 }
Example #8
0
 void validateNoExceptionThrown()
 {
     CHECK_FALSE ( m_exceptionThrown );
     LONGS_EQUAL ( 0, getExceptionCode() );
 }
Example #9
0
 void validateExceptionCode(int expectedExceptionCode)
 {
     m_expectedException = expectedExceptionCode;
     LONGS_EQUAL ( expectedExceptionCode, getExceptionCode() );
 }
Example #10
0
 void teardown()
 {
     LONGS_EQUAL ( m_expectedException, getExceptionCode() );
     clearExceptionCode();
     platformMock_Uninit();
 }
 void teardown()
 {
     CHECK_EQUAL(noException, getExceptionCode());
     StandardIComm_Uninit(m_pComm);
     ConsoleMock_Uninit();
 }
Example #12
0
 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());
 }