Remove a few warnings occuring in some build config

This commit is contained in:
louiz’
2017-05-21 12:23:10 +02:00
parent 154c12f363
commit cf1c8f188c
2 changed files with 11 additions and 4 deletions
+5 -4
View File
@@ -30,15 +30,16 @@ TEST_CASE("Test basic XML parsing")
// And do the same checks on moved-constructed stanza
Stanza moved(std::move(copy));
});
xml.feed(doc.data(), doc.size(), true);
CHECK(doc.size() <= std::numeric_limits<int>::max());
xml.feed(doc.data(), static_cast<int>(doc.size()), true);
const std::string doc2 = "<stream xmlns='s'><stanza>coucou\r\n\a</stanza></stream>";
xml.add_stanza_callback([](const Stanza& stanza)
{
CHECK(stanza.get_inner() == "coucou\r\n");
});
xml.feed(doc2.data(), doc.size(), true);
CHECK(doc.size() <= std::numeric_limits<int>::max());
xml.feed(doc2.data(), static_cast<int>(doc.size()), true);
}
TEST_CASE("XML escape")
@@ -68,4 +69,4 @@ TEST_CASE("substanzas")
CHECK(b.has_children());
}
CHECK(a.has_children());
}
}