[Opensrf-commits] r1027 - branches/new-json2/src/libopensrf

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Jul 11 21:22:38 EDT 2007


Author: erickson
Date: 2007-07-11 21:17:52 -0400 (Wed, 11 Jul 2007)
New Revision: 1027

Modified:
   branches/new-json2/src/libopensrf/osrf_json_test.c
Log:
slightly simplified test

Modified: branches/new-json2/src/libopensrf/osrf_json_test.c
===================================================================
--- branches/new-json2/src/libopensrf/osrf_json_test.c	2007-07-11 22:13:11 UTC (rev 1026)
+++ branches/new-json2/src/libopensrf/osrf_json_test.c	2007-07-12 01:17:52 UTC (rev 1027)
@@ -7,17 +7,18 @@
 
 static void speedTest();
 
+
 int main(int argc, char* argv[]) {
     /* XXX add support for command line test type specification */
     speedTest(); 
-   return 0; 
+    return 0; 
 }
 
 
 
 static void speedTest() {
 
-    /* creates a giant json object, generation the JSON string
+    /* creates a giant json object, generating JSON strings
      * of subobjects as it goes. */
 
     int i,k;
@@ -44,22 +45,12 @@
 
         jsonString = jsonObjectToJSON(hash);
         printf("%s\n\n", jsonString);
-
         dupe = jsonParseString(jsonString);
-        jsonObjectFree(dupe);
 
+        jsonObjectFree(dupe);
         free(jsonString);
-
     }
 
-    jsonString = jsonObjectToJSON(hash);
-    dupe = jsonParseString(jsonString);
-    free(jsonString);
-
-    jsonObjectFree(dupe);
-    dupe = jsonObjectClone(hash);
-
-    jsonObjectFree(dupe);
     jsonObjectFree(hash);
 }
 



More information about the opensrf-commits mailing list