diff options
Diffstat (limited to 'Swiften/JID/UnitTest/JIDTest.cpp')
| -rw-r--r-- | Swiften/JID/UnitTest/JIDTest.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Swiften/JID/UnitTest/JIDTest.cpp b/Swiften/JID/UnitTest/JIDTest.cpp index 894378d..fc7583f 100644 --- a/Swiften/JID/UnitTest/JIDTest.cpp +++ b/Swiften/JID/UnitTest/JIDTest.cpp | |||
| @@ -24,6 +24,7 @@ class JIDTest : public CppUnit::TestFixture | |||
| 24 | CPPUNIT_TEST(testConstructorWithString_OnlyDomainDotStrippedOff); | 24 | CPPUNIT_TEST(testConstructorWithString_OnlyDomainDotStrippedOff); |
| 25 | CPPUNIT_TEST(testConstructorWithString_InvalidOnlyDomainSingleDot); | 25 | CPPUNIT_TEST(testConstructorWithString_InvalidOnlyDomainSingleDot); |
| 26 | CPPUNIT_TEST(testConstructorWithString_InvalidDomain); | 26 | CPPUNIT_TEST(testConstructorWithString_InvalidDomain); |
| 27 | CPPUNIT_TEST(testConstructorWithString_InvalidDomainOnlyDigits); | ||
| 27 | CPPUNIT_TEST(testConstructorWithString_InvalidDomainEmptyLabel); | 28 | CPPUNIT_TEST(testConstructorWithString_InvalidDomainEmptyLabel); |
| 28 | CPPUNIT_TEST(testConstructorWithString_UpperCaseNode); | 29 | CPPUNIT_TEST(testConstructorWithString_UpperCaseNode); |
| 29 | CPPUNIT_TEST(testConstructorWithString_UpperCaseDomain); | 30 | CPPUNIT_TEST(testConstructorWithString_UpperCaseDomain); |
| @@ -162,6 +163,10 @@ class JIDTest : public CppUnit::TestFixture | |||
| 162 | CPPUNIT_ASSERT(!JID("foo@bar,baz").isValid()); | 163 | CPPUNIT_ASSERT(!JID("foo@bar,baz").isValid()); |
| 163 | } | 164 | } |
| 164 | 165 | ||
| 166 | void testConstructorWithString_InvalidDomainOnlyDigits() { | ||
| 167 | CPPUNIT_ASSERT(!JID("1234").isValid()); | ||
| 168 | } | ||
| 169 | |||
| 165 | void testConstructorWithString_InvalidDomainEmptyLabel() { | 170 | void testConstructorWithString_InvalidDomainEmptyLabel() { |
| 166 | CPPUNIT_ASSERT(!JID("foo@bar..").isValid()); | 171 | CPPUNIT_ASSERT(!JID("foo@bar..").isValid()); |
| 167 | } | 172 | } |
Swift