/* * Copyright (c) 2011 Vlad Voicu * Licensed under the Simplified BSD license. * See Documentation/Licenses/BSD-simplified.txt for more information. */ #include #include #include #include using namespace Swift; class ReplaceParserTest : public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(ReplaceParserTest); CPPUNIT_TEST(testParseTrivial); CPPUNIT_TEST(testParseChild); CPPUNIT_TEST_SUITE_END(); public: void testParseTrivial() { PayloadsParserTester parser; CPPUNIT_ASSERT(parser.parse("")); Replace::ref payload = boost::dynamic_pointer_cast (parser.getPayload()); CPPUNIT_ASSERT_EQUAL(std::string("bad1"), payload->getId()); } void testParseChild() { PayloadsParserTester parser; CPPUNIT_ASSERT(parser.parse("")); Replace::ref payload = boost::dynamic_pointer_cast (parser.getPayload()); CPPUNIT_ASSERT_EQUAL(std::string("bad1"), payload->getId()); } }; CPPUNIT_TEST_SUITE_REGISTRATION(ReplaceParserTest);