diff options
author | louiz’ <louiz@louiz.org> | 2017-05-21 12:23:10 +0200 |
---|---|---|
committer | louiz’ <louiz@louiz.org> | 2017-05-21 12:23:10 +0200 |
commit | cf1c8f188c64ffe6cce941027190ef3cd90abf6e (patch) | |
tree | 49829dc586b07439c67e16b2aecb26e61cda8ff3 /tests | |
parent | 154c12f363e5b99b18420980c5f19bb206738d70 (diff) | |
download | biboumi-cf1c8f188c64ffe6cce941027190ef3cd90abf6e.tar.gz biboumi-cf1c8f188c64ffe6cce941027190ef3cd90abf6e.tar.bz2 biboumi-cf1c8f188c64ffe6cce941027190ef3cd90abf6e.tar.xz biboumi-cf1c8f188c64ffe6cce941027190ef3cd90abf6e.zip |
Remove a few warnings occuring in some build config
Diffstat (limited to 'tests')
-rw-r--r-- | tests/xmpp.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/xmpp.cpp b/tests/xmpp.cpp index 7ea03a9..14c51da 100644 --- a/tests/xmpp.cpp +++ b/tests/xmpp.cpp @@ -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()); -}
\ No newline at end of file +} |