summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2011-08-19 04:25:13 +0000
committerarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2011-08-19 04:25:13 +0000
commit8a5144a927fb2659bc80d18620121d99cfcf1edc (patch)
tree3d12e21ae8a10c6eda7c0ffa2d10038126755d57 /tests
parent1d6db79bd98e13a9fc009fb9d1114bc745b2b0b3 (diff)
Fixed unspecified bool conversion for MSVC CLR for the case when pugixml is compiled as unmanaged and calling code is compiled as managed. Fixes issue 121.
git-svn-id: http://pugixml.googlecode.com/svn/trunk@817 99668b35-9821-0410-8761-19e4c4f06640
Diffstat (limited to 'tests')
-rw-r--r--tests/helpers.hpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/helpers.hpp b/tests/helpers.hpp
index abe6626..172f231 100644
--- a/tests/helpers.hpp
+++ b/tests/helpers.hpp
@@ -13,8 +13,17 @@ template <typename T> static void generic_bool_ops_test(const T& obj)
CHECK(obj);
CHECK(!!obj);
+#ifdef _MSC_VER
+# pragma warning(push)
+# pragma warning(disable: 4800) // forcing value to bool 'true' or 'false' (performance warning) - we really want to just cast to bool instead of !!
+#endif
+
bool b1 = null, b2 = obj;
+#ifdef _MSC_VER
+# pragma warning(pop)
+#endif
+
CHECK(!b1);
CHECK(b2);