mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-17 03:02:24 +01:00
Add overload to 'print' void* correctly
This commit is contained in:
parent
ba3408b2dc
commit
5cddabdc9c
@ -79,6 +79,19 @@ namespace Detail {
|
||||
}
|
||||
};
|
||||
|
||||
// For display purposes only.
|
||||
// Anything implicitly convertible to void* ends up here
|
||||
inline std::string rawMemoryToString(void* p)
|
||||
{
|
||||
std::ostringstream oss;
|
||||
#ifdef _MSC_VER
|
||||
oss << "0x" << p;
|
||||
#else
|
||||
oss << p;
|
||||
#endif
|
||||
return oss.str();
|
||||
}
|
||||
|
||||
// For display purposes only.
|
||||
// Does not consider endian-ness
|
||||
template<typename T>
|
||||
|
@ -498,7 +498,9 @@ def approveXml( baseName, args ):
|
||||
f = open( rawResultsPath, 'r' )
|
||||
for line in f:
|
||||
xml += line
|
||||
f.close()
|
||||
#xml = xml.replace("<hex digits>", "<hex digits>")
|
||||
os.remove( rawResultsPath )
|
||||
|
||||
otherResultsTestParser = re.compile( r'(.*\\)(.*\..pp)' )
|
||||
hexParser = re.compile( r'(.*)\b(0[xX][0-9a-fA-F]+)\b(.*)' )
|
||||
@ -743,6 +745,8 @@ def approveMsTest( baseName, filter ):
|
||||
if line.startswith("Results file:") or line.startswith("Results File:"):
|
||||
trxFile = line[13:].strip()
|
||||
parseTrxFile(baseName, trxFile)
|
||||
f.close()
|
||||
os.remove( rawResultsPath )
|
||||
|
||||
# Standard console reporter
|
||||
approve( "console.std", ["~_"] )
|
||||
|
Loading…
Reference in New Issue
Block a user