slightly simplified test
authorerickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Thu, 12 Jul 2007 01:17:52 +0000 (01:17 +0000)
committererickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Thu, 12 Jul 2007 01:17:52 +0000 (01:17 +0000)
git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/new-json2@1027 9efc2488-bf62-4759-914b-345cdb29e865

src/libopensrf/osrf_json_test.c

index 41819ab..b3df610 100644 (file)
@@ -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 @@ static void speedTest() {
 
         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);
 }