#include "testing/testing.hpp" #include "indexer/classificator_loader.hpp" #include "indexer/feature.hpp" UNIT_TEST(FeatureType_FromXMLAndBackToXML) { classificator::Load(); string const xmlNoTypeStr = R"( )"; char const kTimestamp[] = "2015-11-27T21:13:32Z"; editor::XMLFeature xmlNoType(xmlNoTypeStr); editor::XMLFeature xmlWithType = xmlNoType; xmlWithType.SetTagValue("amenity", "atm"); FeatureType ft; ft.FromXML(xmlWithType); auto fromFtWithType = ft.ToXML(true); fromFtWithType.SetAttribute("timestamp", kTimestamp); TEST_EQUAL(fromFtWithType, xmlWithType, ()); auto fromFtWithoutType = ft.ToXML(false); fromFtWithoutType.SetAttribute("timestamp", kTimestamp); TEST_EQUAL(fromFtWithoutType, xmlNoType, ()); }