diff 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
line wrap: on
line diff
--- a/UnitTestsSources/UnitTestsMain.cpp	Thu Jul 17 16:01:41 2014 +0200
+++ b/UnitTestsSources/UnitTestsMain.cpp	Fri Jul 18 16:41:10 2014 +0200
@@ -674,6 +674,25 @@
 }
 
 
+#if ORTHANC_PUGIXML_ENABLED == 1
+TEST(Toolbox, Xml)
+{
+  Json::Value a;
+  a["hello"] = "world";
+  a["42"] = 43;
+  a["b"] = Json::arrayValue;
+  a["b"].append("test");
+  a["b"].append("test2");
+
+  std::string s;
+  Toolbox::JsonToXml(s, a);
+
+  std::cout << s;
+}
+
+#endif
+
+
 int main(int argc, char **argv)
 {
   // Initialize Google's logging library.