// // Created by trotfunky on 07/05/19. // #include #include "Circle.h" #include "xmlParser.h" TEST(readXML,initEmptyCircle) { xmlParser::Circle cercle; cercle.initCirle(); ASSERT_EQ(cercle.x,0); ASSERT_EQ(cercle.y,1); ASSERT_EQ(cercle.r,2); ASSERT_EQ(cercle.label,"Test circle"); } TEST(readXML,initEmptyCirclePugiXML) { xmlParser::Circle cercle; pugi::xml_node node; cercle.initCircle(node); ASSERT_EQ(cercle.x,0); ASSERT_EQ(cercle.y,1); ASSERT_EQ(cercle.r,2); ASSERT_EQ(cercle.label,"Test circle"); } TEST(readXML,parseXMLCircle) { std::string xml = "\n" ""; pugi::xml_document doc; pugi::xml_parse_result result = doc.load_string(xml.c_str()); EXPECT_NE(0,result); xmlParser::Circle cercle; cercle.initCircle(doc.child("Circle")); } int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc,argv); return RUN_ALL_TESTS(); }