summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2016-10-05 14:29:42 (GMT)
committerKevin Smith <kevin.smith@isode.com>2016-10-05 15:07:17 (GMT)
commit51a21158cef39a384c5869c0a0d0b476977bc7a7 (patch)
treec2606ae173865af50c6f330a74911071fc1e28a8 /Swiften/Parser/PayloadParsers
parentd29c0ee50a606bf1f4510ea427aef257870c17c0 (diff)
downloadswift-51a21158cef39a384c5869c0a0d0b476977bc7a7.zip
swift-51a21158cef39a384c5869c0a0d0b476977bc7a7.tar.bz2
Add missing sensible asserts to testing and QtMainWindow
Test-Information: Unit tests pass in ASAN-enabled build on macOS 10.12. Change-Id: I7a8dae7d06e5e1d3dc9391f9c9a342df384d90fc
Diffstat (limited to 'Swiften/Parser/PayloadParsers')
-rw-r--r--Swiften/Parser/PayloadParsers/UnitTest/FormParserTest.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/Swiften/Parser/PayloadParsers/UnitTest/FormParserTest.cpp b/Swiften/Parser/PayloadParsers/UnitTest/FormParserTest.cpp
index ace6bcb..610c4f3 100644
--- a/Swiften/Parser/PayloadParsers/UnitTest/FormParserTest.cpp
+++ b/Swiften/Parser/PayloadParsers/UnitTest/FormParserTest.cpp
@@ -33,6 +33,7 @@ class FormParserTest : public CppUnit::TestFixture {
));
Form* payload = dynamic_cast<Form*>(parser.getPayload().get());
+ CPPUNIT_ASSERT(payload);
CPPUNIT_ASSERT_EQUAL(std::string("Bot Configuration"), payload->getTitle());
CPPUNIT_ASSERT_EQUAL(std::string("Hello!\nFill out this form to configure your new bot!"), payload->getInstructions());
CPPUNIT_ASSERT_EQUAL(Form::SubmitType, payload->getType());
@@ -65,6 +66,7 @@ class FormParserTest : public CppUnit::TestFixture {
"</x>"));
Form* payload = dynamic_cast<Form*>(parser.getPayload().get());
+ CPPUNIT_ASSERT(payload);
CPPUNIT_ASSERT_EQUAL(0, static_cast<int>(payload->getFields().size()));
// PAGE ONE - parsing of element types
CPPUNIT_ASSERT_EQUAL(std::string("P1"), payload->getPages()[0]->getLabel());
@@ -126,6 +128,7 @@ class FormParserTest : public CppUnit::TestFixture {
"</x>"));
Form* payload = dynamic_cast<Form*>(parser.getPayload().get());
+ CPPUNIT_ASSERT(payload);
CPPUNIT_ASSERT_EQUAL(10, static_cast<int>(payload->getFields().size()));
CPPUNIT_ASSERT_EQUAL(std::string("jabber:bot"), payload->getFields()[0]->getValues()[0]);