diff options
| author | Emmanuele Bassi <ebassi@linux.intel.com> | 2011-01-10 10:43:58 +0000 |
|---|---|---|
| committer | Emmanuele Bassi <ebassi@linux.intel.com> | 2011-01-10 10:43:58 +0000 |
| commit | 3dbab961e675d0684df1121906ae3588d09653e6 (patch) | |
| tree | 8179a54e84a714cc17675295dba092eb93c2ea86 /json-glib | |
| parent | 567d7fb4dff83c9e37e64ef8611f0231fa181c34 (diff) | |
| download | json-glib-3dbab961e675d0684df1121906ae3588d09653e6.tar.gz | |
builder-test: Do not compare serialized double values
Serialization of floating point values might lead to odd formats,
especially when dealing with IEEE machine-neutral values.
Diffstat (limited to 'json-glib')
| -rw-r--r-- | json-glib/tests/builder-test.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/json-glib/tests/builder-test.c b/json-glib/tests/builder-test.c index eba54c2..6812434 100644 --- a/json-glib/tests/builder-test.c +++ b/json-glib/tests/builder-test.c @@ -6,7 +6,7 @@ #include <json-glib/json-glib.h> -static const gchar *complex_object = "{ \"depth1\" : [ 1, { \"depth2\" : [ 2.3, [ null ], \"after array\" ], \"value2\" : true } ], \"object1\" : { } }\") == 0)"; +static const gchar *complex_object = "{ \"depth1\" : [ 1, { \"depth2\" : [ 3, [ null ], \"after array\" ], \"value2\" : true } ], \"object1\" : { } }\") == 0)"; static const gchar *reset_object = "{ \"test\" : \"reset\" }"; static const gchar *reset_array = "[ \"reset\" ]"; @@ -30,7 +30,7 @@ test_builder_complex (void) json_builder_set_member_name (builder, "depth2"); json_builder_begin_array (builder); - json_builder_add_double_value (builder, 2.3); + json_builder_add_int_value (builder, 3); json_builder_begin_array (builder); json_builder_add_null_value (builder); |
