]> granicus.if.org Git - json-c/commitdiff
gitignore test; add double value set checks in test
authorStoian Ivanov <sdr@mail.bg>
Thu, 6 Oct 2016 20:32:19 +0000 (23:32 +0300)
committerStoian Ivanov <sdr@mail.bg>
Thu, 6 Oct 2016 20:32:19 +0000 (23:32 +0300)
.gitignore
tests/test_set_value.c
tests/test_set_value.expected

index ac8d17cb3b56dc75d9557ef3ab6239388dcb70d8..68b6fcf6026c889d16ac9539667d38c6a6cff1a6 100644 (file)
@@ -33,6 +33,7 @@
 /tests/test_set_serializer
 /tests/test_compare
 /tests/test_util_file
+/tests/test_set_value
 /tests/*.vg.out
 /tests/*.log
 /tests/*.trs
index a3212607618113be4d6fb541dea83ef9e5cd9bc5..f64924cfc3f2be0fe3140ff4c615df140a49182d 100644 (file)
@@ -23,8 +23,14 @@ int main(int argc, char **argv)
        assert (json_object_get_boolean(tmp)==TRUE); 
        json_object_put(tmp);
        printf("BOOL PASSED\n");
-       
-       
+       tmp=json_object_new_double(12.34);
+       assert (json_object_get_double(tmp)==12.34); 
+       json_object_set_double(tmp,34.56);
+       assert (json_object_get_double(tmp)==34.56); 
+       json_object_set_double(tmp,6435.34);
+       assert (json_object_get_double(tmp)==6435.34); 
+       json_object_put(tmp);
+       printf("DOUBLE PASSED\n");
        printf("PASSED\n");
        return 0;
 }
index 0ac57fe6bb7f5b358b89f3f0632ad7f3ef64c89f..ccc3f5c4e11c15081b8def8766892055eb1781c2 100644 (file)
@@ -1,4 +1,5 @@
 INT PASSED
 INT64 PASSED
 BOOL PASSED
+DOUBLE PASSED
 PASSED