Skip to content

Commit

Permalink
gitignore test; add double value set checks in test
Browse files Browse the repository at this point in the history
  • Loading branch information
Stoian Ivanov committed Oct 6, 2016
1 parent 6a06675 commit 9a313f7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 8 additions & 2 deletions tests/test_set_value.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
1 change: 1 addition & 0 deletions tests/test_set_value.expected
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
INT PASSED
INT64 PASSED
BOOL PASSED
DOUBLE PASSED
PASSED

0 comments on commit 9a313f7

Please sign in to comment.