summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Parser/UnitTest/AttributeMapTest.cpp')
m---------Swiften0
-rw-r--r--Swiften/Parser/UnitTest/AttributeMapTest.cpp71
2 files changed, 0 insertions, 71 deletions
diff --git a/Swiften b/Swiften
new file mode 160000
+Subproject 8213ba16d0043d2461f4b031c881d61dda5a38c
diff --git a/Swiften/Parser/UnitTest/AttributeMapTest.cpp b/Swiften/Parser/UnitTest/AttributeMapTest.cpp
deleted file mode 100644
index 17bda95..0000000
--- a/Swiften/Parser/UnitTest/AttributeMapTest.cpp
+++ /dev/null
@@ -1,71 +0,0 @@
-#include <cppunit/extensions/HelperMacros.h>
-#include <cppunit/extensions/TestFactoryRegistry.h>
-
-#include "Swiften/Parser/AttributeMap.h"
-
-using namespace Swift;
-
-class AttributeMapTest : public CppUnit::TestFixture
-{
- CPPUNIT_TEST_SUITE(AttributeMapTest);
- CPPUNIT_TEST(testGetBoolAttribute_True);
- CPPUNIT_TEST(testGetBoolAttribute_1);
- CPPUNIT_TEST(testGetBoolAttribute_False);
- CPPUNIT_TEST(testGetBoolAttribute_0);
- CPPUNIT_TEST(testGetBoolAttribute_Invalid);
- CPPUNIT_TEST(testGetBoolAttribute_UnknownWithDefaultTrue);
- CPPUNIT_TEST(testGetBoolAttribute_UnknownWithDefaultFalse);
- CPPUNIT_TEST_SUITE_END();
-
- public:
- AttributeMapTest() {}
-
- void testGetBoolAttribute_True() {
- AttributeMap testling;
- testling["foo"] = "true";
-
- CPPUNIT_ASSERT(testling.getBoolAttribute("foo"));
- }
-
- void testGetBoolAttribute_1() {
- AttributeMap testling;
- testling["foo"] = "1";
-
- CPPUNIT_ASSERT(testling.getBoolAttribute("foo"));
- }
-
- void testGetBoolAttribute_False() {
- AttributeMap testling;
- testling["foo"] = "false";
-
- CPPUNIT_ASSERT(!testling.getBoolAttribute("foo", true));
- }
-
- void testGetBoolAttribute_0() {
- AttributeMap testling;
- testling["foo"] = "0";
-
- CPPUNIT_ASSERT(!testling.getBoolAttribute("foo", true));
- }
-
- void testGetBoolAttribute_Invalid() {
- AttributeMap testling;
- testling["foo"] = "bla";
-
- CPPUNIT_ASSERT(!testling.getBoolAttribute("foo", true));
- }
-
- void testGetBoolAttribute_UnknownWithDefaultTrue() {
- AttributeMap testling;
-
- CPPUNIT_ASSERT(testling.getBoolAttribute("foo", true));
- }
-
- void testGetBoolAttribute_UnknownWithDefaultFalse() {
- AttributeMap testling;
-
- CPPUNIT_ASSERT(!testling.getBoolAttribute("foo", false));
- }
-};
-
-CPPUNIT_TEST_SUITE_REGISTRATION(AttributeMapTest);