summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEric Haszlakiewicz <erh+git@nimenees.com>2014-03-09 16:41:33 -0400
committerEric Haszlakiewicz <erh+git@nimenees.com>2014-03-09 16:41:33 -0400
commit0eedf3802fad2d41e45eecd92af529440f0d7d3a (patch)
tree6149e87e18589634dece0add4d66417135a6bee1 /tests
parente6f1322b5e0fbbd5b8767b60c5fe34ff4468ec42 (diff)
Issue#102 - add support for parsing "NaN".
Diffstat (limited to 'tests')
-rw-r--r--tests/test_parse.c4
-rw-r--r--tests/test_parse.expected1
2 files changed, 5 insertions, 0 deletions
diff --git a/tests/test_parse.c b/tests/test_parse.c
index 1a59a6b..f0f2550 100644
--- a/tests/test_parse.c
+++ b/tests/test_parse.c
@@ -47,6 +47,10 @@ static void test_basic_parse()
printf("new_obj.to_string()=%s\n", json_object_to_json_string(new_obj));
json_object_put(new_obj);
+ new_obj = json_tokener_parse("NaN");
+ printf("new_obj.to_string()=%s\n", json_object_to_json_string(new_obj));
+ json_object_put(new_obj);
+
new_obj = json_tokener_parse("True");
printf("new_obj.to_string()=%s\n", json_object_to_json_string(new_obj));
json_object_put(new_obj);
diff --git a/tests/test_parse.expected b/tests/test_parse.expected
index 5ea99d8..378a82b 100644
--- a/tests/test_parse.expected
+++ b/tests/test_parse.expected
@@ -3,6 +3,7 @@ new_obj.to_string()="foo"
new_obj.to_string()="foo"
new_obj.to_string()="ABC"
new_obj.to_string()=null
+new_obj.to_string()=NaN
new_obj.to_string()=true
new_obj.to_string()=12
new_obj.to_string()=12.3