diff options
Diffstat (limited to 'Swiften/Elements/UnitTest/FormTest.cpp')
-rw-r--r-- | Swiften/Elements/UnitTest/FormTest.cpp | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/Swiften/Elements/UnitTest/FormTest.cpp b/Swiften/Elements/UnitTest/FormTest.cpp index ea680f9..9255fa8 100644 --- a/Swiften/Elements/UnitTest/FormTest.cpp +++ b/Swiften/Elements/UnitTest/FormTest.cpp @@ -15,44 +15,44 @@ using namespace Swift; class FormTest : public CppUnit::TestFixture { - CPPUNIT_TEST_SUITE(FormTest); - CPPUNIT_TEST(testGetFormType); - CPPUNIT_TEST(testGetFormType_InvalidFormType); - CPPUNIT_TEST(testGetFormType_NoFormType); - CPPUNIT_TEST_SUITE_END(); + CPPUNIT_TEST_SUITE(FormTest); + CPPUNIT_TEST(testGetFormType); + CPPUNIT_TEST(testGetFormType_InvalidFormType); + CPPUNIT_TEST(testGetFormType_NoFormType); + CPPUNIT_TEST_SUITE_END(); - public: - void testGetFormType() { - Form form; + public: + void testGetFormType() { + Form form; - form.addField(boost::make_shared<FormField>(FormField::FixedType, "Foo")); + form.addField(boost::make_shared<FormField>(FormField::FixedType, "Foo")); - FormField::ref field = boost::make_shared<FormField>(FormField::HiddenType, "jabber:bot"); - field->setName("FORM_TYPE"); - form.addField(field); + FormField::ref field = boost::make_shared<FormField>(FormField::HiddenType, "jabber:bot"); + field->setName("FORM_TYPE"); + form.addField(field); - form.addField(boost::make_shared<FormField>(FormField::FixedType, "Bar")); + form.addField(boost::make_shared<FormField>(FormField::FixedType, "Bar")); - CPPUNIT_ASSERT_EQUAL(std::string("jabber:bot"), form.getFormType()); - } + CPPUNIT_ASSERT_EQUAL(std::string("jabber:bot"), form.getFormType()); + } - void testGetFormType_InvalidFormType() { - Form form; + void testGetFormType_InvalidFormType() { + Form form; - FormField::ref field = boost::make_shared<FormField>(FormField::FixedType, "jabber:bot"); - field->setName("FORM_TYPE"); - form.addField(field); + FormField::ref field = boost::make_shared<FormField>(FormField::FixedType, "jabber:bot"); + field->setName("FORM_TYPE"); + form.addField(field); - CPPUNIT_ASSERT_EQUAL(std::string(""), form.getFormType()); - } + CPPUNIT_ASSERT_EQUAL(std::string(""), form.getFormType()); + } - void testGetFormType_NoFormType() { - Form form; + void testGetFormType_NoFormType() { + Form form; - form.addField(boost::make_shared<FormField>(FormField::FixedType, "Foo")); + form.addField(boost::make_shared<FormField>(FormField::FixedType, "Foo")); - CPPUNIT_ASSERT_EQUAL(std::string(""), form.getFormType()); - } + CPPUNIT_ASSERT_EQUAL(std::string(""), form.getFormType()); + } }; CPPUNIT_TEST_SUITE_REGISTRATION(FormTest); |