1 parent
695830c453
commit
a4d9d54010
1 file changed
+8
-5
+8
-5
@@ -2,6 +2,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <math.h>
|
||||||
#ifdef HAVE_PTHREAD
|
#ifdef HAVE_PTHREAD
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -199,11 +200,13 @@ static void run_jq_tests(jv lib_dirs, int verbose, FILE *testdata, int skip, int
|
|||||||
pass = 0;
|
pass = 0;
|
||||||
}
|
}
|
||||||
#ifdef USE_DECNUM
|
#ifdef USE_DECNUM
|
||||||
jv as_string = jv_dump_string(jv_copy(expected), rand() & ~(JV_PRINT_COLOR|JV_PRINT_REFCOUNT));
|
if (!(jv_get_kind(expected) == JV_KIND_NUMBER && isnan(jv_number_value(expected)))) {
|
||||||
jv reparsed = jv_parse_sized(jv_string_value(as_string), jv_string_length_bytes(jv_copy(as_string)));
|
jv as_string = jv_dump_string(jv_copy(expected), rand() & ~(JV_PRINT_COLOR|JV_PRINT_REFCOUNT));
|
||||||
assert(jv_equal(jv_copy(expected), jv_copy(reparsed)));
|
jv reparsed = jv_parse_sized(jv_string_value(as_string), jv_string_length_bytes(jv_copy(as_string)));
|
||||||
jv_free(as_string);
|
assert(jv_equal(jv_copy(expected), jv_copy(reparsed)));
|
||||||
jv_free(reparsed);
|
jv_free(as_string);
|
||||||
|
jv_free(reparsed);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
jv_free(expected);
|
jv_free(expected);
|
||||||
jv_free(actual);
|
jv_free(actual);
|
||||||
|
|||||||
Reference in new issue
Block a user