Mercurial > hg > orthanc
comparison UnitTestsSources/UnitTestsMain.cpp @ 1045:0bfeeb6d340f
json to xml conversion with pugixml
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 18 Jul 2014 16:41:10 +0200 |
parents | 509e146c3cb3 |
children | 64f1842aae2e |
comparison
equal
deleted
inserted
replaced
1044:6d90e2bcab60 | 1045:0bfeeb6d340f |
---|---|
672 #error Support your platform here | 672 #error Support your platform here |
673 #endif | 673 #endif |
674 } | 674 } |
675 | 675 |
676 | 676 |
677 #if ORTHANC_PUGIXML_ENABLED == 1 | |
678 TEST(Toolbox, Xml) | |
679 { | |
680 Json::Value a; | |
681 a["hello"] = "world"; | |
682 a["42"] = 43; | |
683 a["b"] = Json::arrayValue; | |
684 a["b"].append("test"); | |
685 a["b"].append("test2"); | |
686 | |
687 std::string s; | |
688 Toolbox::JsonToXml(s, a); | |
689 | |
690 std::cout << s; | |
691 } | |
692 | |
693 #endif | |
694 | |
695 | |
677 int main(int argc, char **argv) | 696 int main(int argc, char **argv) |
678 { | 697 { |
679 // Initialize Google's logging library. | 698 // Initialize Google's logging library. |
680 FLAGS_logtostderr = true; | 699 FLAGS_logtostderr = true; |
681 FLAGS_minloglevel = 0; | 700 FLAGS_minloglevel = 0; |