https://github.com/philsquared/Catch
Revision 4b614ee1d19514b9f72352b48589301ab808e774 authored by Phil Nash on 27 November 2017, 19:21:47 UTC, committed by Phil Nash on 27 November 2017, 19:23:15 UTC
This makes the assertion handling much less "chatty". AssertionHandler is now just a thin shim over RunContext
1 parent 5461242
Raw File
Tip revision: 4b614ee1d19514b9f72352b48589301ab808e774 authored by Phil Nash on 27 November 2017, 19:21:47 UTC
Moved all AssertionHandler logic into RunContext and de-virtualised interface
Tip revision: 4b614ee
embedClara.py
# Execute this script any time you import a new copy of Clara into the third_party area
import os
import sys
import embed

rootPath = os.path.dirname(os.path.realpath( os.path.dirname(sys.argv[0])))

filename = os.path.join( rootPath, "third_party", "clara.hpp" )
outfilename = os.path.join( rootPath, "include", "external", "clara.hpp" )


# Mapping of pre-processor identifiers
idMap = {
   "CLARA_HPP_INCLUDED": "CATCH_CLARA_HPP_INCLUDED",
    "CLARA_CONFIG_CONSOLE_WIDTH": "CATCH_CLARA_CONFIG_CONSOLE_WIDTH",
    "CLARA_TEXTFLOW_HPP_INCLUDED": "CATCH_CLARA_TEXTFLOW_HPP_INCLUDED",
    "CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH": "CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH",
    "CLARA_PLATFORM_WINDOWS": "CATCH_PLATFORM_WINDOWS"
    }

# outer namespace to add
outerNamespace = { "clara": ("Catch", "clara") }

mapper = embed.LineMapper( idMap, outerNamespace )
mapper.mapFile( filename, outfilename )
back to top