diff options
author | Dmitry-Me <wipedout@yandex.ru> | 2018-10-17 00:27:33 +0300 |
---|---|---|
committer | Dmitry-Me <wipedout@yandex.ru> | 2018-10-17 00:27:33 +0300 |
commit | ed3e9dc82e333f77958bb9251412c4ce86908e33 (patch) | |
tree | edbb72be21deb6078c8cda7599eb62e649186b2f /xmltest.cpp | |
parent | 7e8e249990ec491ec15990cf95b6d871a66cf64a (diff) | |
download | tinyxml2-ed3e9dc82e333f77958bb9251412c4ce86908e33.tar.gz |
Fix slicing of int64_t
Diffstat (limited to 'xmltest.cpp')
-rw-r--r-- | xmltest.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/xmltest.cpp b/xmltest.cpp index 0299909..8f46af9 100644 --- a/xmltest.cpp +++ b/xmltest.cpp @@ -82,8 +82,15 @@ template< class T > bool XMLTest( const char* testString, T expected, T found, b if ( !echo )
printf (" %s\n", testString);
- else
- printf (" %s [%d][%d]\n", testString, static_cast<int>(expected), static_cast<int>(found) );
+ else {
+ char expectedAsString[64];
+ XMLUtil::ToStr(expected, expectedAsString, sizeof(expectedAsString));
+
+ char foundAsString[64];
+ XMLUtil::ToStr(found, foundAsString, sizeof(foundAsString));
+
+ printf (" %s [%s][%s]\n", testString, expectedAsString, foundAsString );
+ }
if ( pass )
++gPass;
|