summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-08-27 17:34:07 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-08-27 17:34:07 (GMT)
commit7f931ab66d8294a20267f1008540532828ab0d20 (patch)
treec6bd3a2a33ac0f099b1624db5f0ec7831d71dc22 /Swiften/JID/UnitTest
parent8da2a30bab8640944de750abd1ba26f8543f12ca (diff)
parent8dbae452004e7bc3c3a6e855f365b9bb348e8f2d (diff)
downloadswift-7f931ab66d8294a20267f1008540532828ab0d20.zip
swift-7f931ab66d8294a20267f1008540532828ab0d20.tar.bz2
Merge branch 'swift-1.x'
* swift-1.x: Update last used certificate file correctly. Mark JIDs with empty domains as invalid when StringPrep cache is disabled. Added StringPrep unit test.
Diffstat (limited to 'Swiften/JID/UnitTest')
-rw-r--r--Swiften/JID/UnitTest/JIDTest.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/Swiften/JID/UnitTest/JIDTest.cpp b/Swiften/JID/UnitTest/JIDTest.cpp
index cd21d03..81d24ea 100644
--- a/Swiften/JID/UnitTest/JIDTest.cpp
+++ b/Swiften/JID/UnitTest/JIDTest.cpp
@@ -25,6 +25,7 @@ class JIDTest : public CppUnit::TestFixture
CPPUNIT_TEST(testConstructorWithString_EmptyNode);
CPPUNIT_TEST(testConstructorWithString_IllegalResource);
CPPUNIT_TEST(testConstructorWithStrings);
+ CPPUNIT_TEST(testConstructorWithStrings_EmptyDomain);
CPPUNIT_TEST(testIsBare);
CPPUNIT_TEST(testIsBare_NotBare);
CPPUNIT_TEST(testToBare);
@@ -144,6 +145,12 @@ class JIDTest : public CppUnit::TestFixture
CPPUNIT_ASSERT_EQUAL(std::string("baz"), testling.getResource());
}
+ void testConstructorWithStrings_EmptyDomain() {
+ JID testling("foo", "", "baz");
+
+ CPPUNIT_ASSERT(!testling.isValid());
+ }
+
void testIsBare() {
CPPUNIT_ASSERT(JID("foo@bar").isBare());
}