diff options
author | Eric Haszlakiewicz <erh+git@nimenees.com> | 2014-03-09 16:41:33 -0400 |
---|---|---|
committer | Eric Haszlakiewicz <erh+git@nimenees.com> | 2014-03-09 16:41:33 -0400 |
commit | 0eedf3802fad2d41e45eecd92af529440f0d7d3a (patch) | |
tree | 6149e87e18589634dece0add4d66417135a6bee1 /tests | |
parent | e6f1322b5e0fbbd5b8767b60c5fe34ff4468ec42 (diff) |
Issue#102 - add support for parsing "NaN".
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_parse.c | 4 | ||||
-rw-r--r-- | tests/test_parse.expected | 1 |
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 |