mirror of
https://github.com/kgabis/parson.git
synced 2024-11-24 06:05:29 +00:00
Workaround for MSVC C2124 error.
This commit is contained in:
parent
bef4969d25
commit
c147744b72
6
tests.c
6
tests.c
@ -316,6 +316,8 @@ void test_suite_4() {
|
||||
}
|
||||
|
||||
void test_suite_5(void) {
|
||||
double zero = 0.0; /* msvc is silly (workaround for error C2124) */
|
||||
|
||||
JSON_Value *val_from_file = json_parse_file("tests/test_5.txt");
|
||||
|
||||
JSON_Value *val = NULL, *val_parent;
|
||||
@ -438,8 +440,8 @@ void test_suite_5(void) {
|
||||
TEST(json_value_equals(remove_test_val, json_parse_string("[2, 4]")));
|
||||
|
||||
/* Testing nan and inf */
|
||||
TEST(json_object_set_number(obj, "num", 0.0 / 0.0) == JSONFailure);
|
||||
TEST(json_object_set_number(obj, "num", 1.0 / 0.0) == JSONFailure);
|
||||
TEST(json_object_set_number(obj, "num", 0.0 / zero) == JSONFailure);
|
||||
TEST(json_object_set_number(obj, "num", 1.0 / zero) == JSONFailure);
|
||||
}
|
||||
|
||||
void test_suite_6(void) {
|
||||
|
Loading…
Reference in New Issue
Block a user