summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArseny Kapoulkine <arseny.kapoulkine@gmail.com>2015-10-17 12:20:21 -0700
committerArseny Kapoulkine <arseny.kapoulkine@gmail.com>2015-10-17 12:20:21 -0700
commitfd605bc9a73dffaffb7194b5344099b2202645ad (patch)
tree671a68929f0b96ec1293b3beac62f38e96be3b75
parent1298c8db79fbadf4459762f47467643de112c168 (diff)
tests: Fix GCC warning
Fix "this decimal constant is unsigned only in ISO C90".
-rw-r--r--tests/test_dom_traverse.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/test_dom_traverse.cpp b/tests/test_dom_traverse.cpp
index 6cebd50..5c7579a 100644
--- a/tests/test_dom_traverse.cpp
+++ b/tests/test_dom_traverse.cpp
@@ -1166,9 +1166,9 @@ TEST_XML(dom_as_uint_overflow, "<node attr1='-1' attr2='4294967296' attr3='52949
xml_node node = doc.child(STR("node"));
CHECK(node.attribute(STR("attr1")).as_uint() == 0);
- CHECK(node.attribute(STR("attr2")).as_uint() == 4294967295);
- CHECK(node.attribute(STR("attr3")).as_uint() == 4294967295);
- CHECK(node.attribute(STR("attr4")).as_uint() == 4294967295);
+ CHECK(node.attribute(STR("attr2")).as_uint() == 4294967295u);
+ CHECK(node.attribute(STR("attr3")).as_uint() == 4294967295u);
+ CHECK(node.attribute(STR("attr4")).as_uint() == 4294967295u);
}
TEST_XML(dom_as_int_hex_overflow, "<node attr1='-0x80000001' attr2='0x80000000' />")
@@ -1184,8 +1184,8 @@ TEST_XML(dom_as_uint_hex_overflow, "<node attr1='-0x1' attr2='0x100000000' attr3
xml_node node = doc.child(STR("node"));
CHECK(node.attribute(STR("attr1")).as_uint() == 0);
- CHECK(node.attribute(STR("attr2")).as_uint() == 4294967295);
- CHECK(node.attribute(STR("attr3")).as_uint() == 4294967295);
+ CHECK(node.attribute(STR("attr2")).as_uint() == 4294967295u);
+ CHECK(node.attribute(STR("attr3")).as_uint() == 4294967295u);
}
TEST_XML(dom_as_int_many_digits, "<node attr1='0000000000000000000000000000000000000000000000001' />")
@@ -1273,4 +1273,4 @@ TEST_XML(dom_as_int_plus, "<node attr1='+1' attr2='+0xa' />")
CHECK(node.attribute(STR("attr2")).as_llong() == 10);
CHECK(node.attribute(STR("attr2")).as_ullong() == 10);
#endif
-} \ No newline at end of file
+}