diff options
author | Remko Tronçon <git@el-tramo.be> | 2010-12-06 19:22:07 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2010-12-06 21:01:49 (GMT) |
commit | 4fc7861cebaa82e5057a7ff7d385b49b79e442a4 (patch) | |
tree | 1deb65bf880cf279dd8463ef8af257071af836ee /Swiften/Parser/UnitTest | |
parent | a38a702e8dd10a5abdd8cebe245c0cd31d6c4ddc (diff) | |
download | swift-contrib-4fc7861cebaa82e5057a7ff7d385b49b79e442a4.zip swift-contrib-4fc7861cebaa82e5057a7ff7d385b49b79e442a4.tar.bz2 |
Fixed assertion failure on invalid stream start.
Resolves: #707
Diffstat (limited to 'Swiften/Parser/UnitTest')
-rw-r--r-- | Swiften/Parser/UnitTest/XMPPParserTest.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Swiften/Parser/UnitTest/XMPPParserTest.cpp b/Swiften/Parser/UnitTest/XMPPParserTest.cpp index 90a4b03..1eaa798 100644 --- a/Swiften/Parser/UnitTest/XMPPParserTest.cpp +++ b/Swiften/Parser/UnitTest/XMPPParserTest.cpp @@ -33,6 +33,7 @@ class XMPPParserTest : public CppUnit::TestFixture { CPPUNIT_TEST(testParse_UnknownElement); CPPUNIT_TEST(testParse_StrayCharacterData); CPPUNIT_TEST(testParse_InvalidStreamStart); + CPPUNIT_TEST(testParse_ElementEndAfterInvalidStreamStart); CPPUNIT_TEST_SUITE_END(); public: @@ -149,6 +150,12 @@ class XMPPParserTest : public CppUnit::TestFixture { CPPUNIT_ASSERT(!testling.parse("<tream>")); } + void testParse_ElementEndAfterInvalidStreamStart() { + XMPPParser testling(&client_, &factories_); + + CPPUNIT_ASSERT(!testling.parse("<tream/>")); + } + private: class Client : public XMPPParserClient { public: |