Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void TestAllTypes(wstring filename)
- {
- Logger::WriteMessage(filename.c_str());
- wstring xml = ReadFile(filename);
- Logger::WriteMessage(xml.c_str());
- // Ensure five items
- Assert::IsTrue(regex_search(xml, wregex(L"<aqua><item.*<item.*<item.*<item.*<item.*</aqua>")));
- // Ensure the positions are correct
- Assert::IsTrue(regex_search(xml, wregex(L"<item x=\"100\" y=\"200\"")));
- Assert::IsTrue(regex_search(xml, wregex(L"<item x=\"400\" y=\"400\"")));
- Assert::IsTrue(regex_search(xml, wregex(L"<item x=\"600\" y=\"100\"")));
- Assert::IsTrue(regex_search(xml, wregex(L"<item x=\"100\" y=\"500\"")));
- Assert::IsTrue(regex_search(xml, wregex(L"<item x=\"700\" y=\"600\"")));
- // Ensure the types are correct
- Assert::IsTrue(regex_search(xml,
- wregex(L"<aqua><item.* type=\"beta\"/><item.* type=\"magikarp\"/><item.* type=\"sparty\"/><item.* type=\"carp\"/><item.* type=\"scull\"/></aqua>")));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement