Eric Haszlakiewicz
a9114392b4
Merge pull request #524 from dota17/addTestCase_obj_token
...
Increase coverage
2020-04-15 23:35:21 -04:00
dota17
b14363ae32
remove unsuitable case
2020-04-15 20:06:12 +08:00
dota17
2876fcc137
clang-format two test_util_file.c and test_object_iterator.c
2020-04-14 10:15:27 +08:00
chenguoping
8096125618
Increased the test coverage of json_util.c from 76% to 90.3%.
2020-04-14 10:10:47 +08:00
chenguoping
f56c5c1a60
Increased the test coverage of json_object_iterator.c from 0% to 100%
2020-04-14 10:03:58 +08:00
dota17
74bbe349c4
clang-format test1.c
2020-04-14 09:20:51 +08:00
chenguoping
110c60fcdd
fix valgrind errors
2020-04-14 09:13:29 +08:00
chenguoping
76e1472808
testcase for array_list
2020-04-14 09:13:06 +08:00
Björn Esser
5e699f7f73
Be verbose on failing json_c_version test.
2020-04-11 21:09:31 +02:00
Eric Haszlakiewicz
c58d56ab7c
Merge pull request #576 from besser82/topic/besser82/increase_coverage
...
Test coverage for json_c_version.
2020-04-11 14:45:45 -04:00
Björn Esser
d47fb12e85
Test coverage for json_c_version.
2020-04-11 12:33:59 +02:00
Björn Esser
73a2ed115a
Remove multiple trailing newlines at EOF.
2020-04-11 10:35:42 +02:00
Björn Esser
78cd37fb18
Clean trailing white-space.
2020-04-11 09:41:04 +02:00
Eric Haszlakiewicz
95737df9d4
Remove autoconf machinery, we're using cmake now. Update the release checklist to account for that, plus fill in other tasks and clean it up a bit.
2020-04-09 02:15:31 +00:00
dota17
8b162c4b89
clang-format the files
2020-04-03 11:39:30 +08:00
dota17
c117d8a8a8
add the disabling formatting coments and adjust the partial code manuly
2020-04-03 11:28:04 +08:00
dota17
3822177473
add test cases
2020-03-31 19:12:45 +08:00
Eric Haszlakiewicz
a8c9284f06
Merge pull request #547 from dota17/assert_test
...
modify json-c default build type, and fix up the assert() errors in t…
2020-03-03 07:54:21 -06:00
dota17
e56ab0146f
update testcase and delete debug -O0 build
2020-03-02 20:19:35 +08:00
dota17
2d44f865c3
modify json-c default build type, and fix up the assert() errors in testcase
2020-02-29 15:32:42 +08:00
dota17
6359b79847
update json_object.c and testcase, delete json_object_uint_inc()
2020-02-28 17:51:56 +08:00
dota17
9532f94fa4
modify partial functions and testcase, in order to support automatic conversion for int64/uint64
2020-02-28 09:25:02 +08:00
dota17
c816de212b
modify the json_object, replace c_int64/c_uint64 with struct{union{int64, uint64},...}
2020-02-27 10:26:27 +08:00
dota17
3c3b5920f7
add uint64 data to json-c
2020-02-25 14:51:35 +08:00
Eric Haszlakiewicz
4bf7ffa984
Issue #539 : be sure to clean up at the end of test_set_value.
2020-02-14 03:25:46 +00:00
Eric Haszlakiewicz
ae13ca524a
Issue #539 : reset the serializer when json_object_set_double() is called and the current serializer is the one that json_object_new_double_s() used.
2020-02-13 03:11:10 +00:00
Eric Haszlakiewicz
0ffdbb2395
Merge pull request #531 from dota17/utf8test
...
validate utf-8 string
2020-02-05 21:56:06 -05:00
dota17
010f33d460
add json_object_new_null
2020-01-20 16:46:46 +08:00
dota17
787a8b3f1c
update code
2020-01-20 10:41:24 +08:00
Po-Chuan Hsieh
bb5971ba2a
Fix make check
...
cc -DHAVE_CONFIG_H -I. -I.. -I.. -I../tests -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -Wall -Werror -Wcast-qual -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -D_GNU_SOURCE -D_REENTRANT -MT test_parse.o -MD -MP -MF .deps/test_parse.Tpo -c -o test_parse.o test_parse.c
test_parse.c:256:14: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int]
{ "null123" + 4, 4, 3, json_tokener_success, 1 },
~~~~~~~~~~^~~
test_parse.c:256:14: note: use array indexing to silence this warning
{ "null123" + 4, 4, 3, json_tokener_success, 1 },
^
& [ ]
test_parse.c:258:12: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int]
{ "nullx" + 4, 2, 0, json_tokener_error_parse_unexpected, 1 },
~~~~~~~~^~~
test_parse.c:258:12: note: use array indexing to silence this warning
{ "nullx" + 4, 2, 0, json_tokener_error_parse_unexpected, 1 },
^
& [ ]
test_parse.c:260:25: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int]
{ "{\"a\":1}{\"b\":2}" + 7,
~~~~~~~~~~~~~~~~~~~~~^~~
test_parse.c:260:25: note: use array indexing to silence this warning
{ "{\"a\":1}{\"b\":2}" + 7,
^
& [ ]
3 errors generated.
*** Error code 1
Stop.
2020-01-11 07:20:44 +00:00
dota17
eca74dcccf
test utf8
2020-01-10 18:33:14 +08:00
Eric Haszlakiewicz
e651e96a5b
Merge pull request #526 from dota17/addTestCase_printbuf
...
Increased the test coverage of printbuf.c 82% to 92%.
2020-01-03 08:32:53 -05:00
Eric Haszlakiewicz
a255510cca
Merge pull request #525 from dota17/addPointerTestcase
...
update pointer test case
2020-01-03 08:31:41 -05:00
chenguoping
8c0cb0bd28
Increased the test coverage of printbuf.c 82% to 92%.
2020-01-03 14:34:35 +08:00
Eric Haszlakiewicz
0421772bbc
Merge pull request #523 from dota17/updatetestcase
...
update tsetcase for tokener_c
2020-01-02 22:22:57 -05:00
Eric Haszlakiewicz
4bfed6eb2f
Merge pull request #522 from dota17/addVisitTestcase
...
update json_visit testcase
2020-01-02 22:22:09 -05:00
dota17
5fe4448541
update tsetcase for tokener_c
2020-01-02 19:19:12 +08:00
dota17
a5089f5a79
update json_visit testcase
2020-01-02 16:41:37 +08:00
dota17
48ae9e8874
update pointer test case
2020-01-02 10:49:29 +08:00
chenguoping
424b315ce0
pointer types discards qualifiers
2019-12-27 15:39:31 +08:00
chenguoping
1446572997
add testcases of object and token
2019-12-27 15:07:00 +08:00
Jaap Keuter
78d8e5c3d5
Properly append to CMAKE_C_FLAGS string
...
Contrary to other CMAKE variables the CMAKE_C_FLAGS variable is the
composed string of flags for the C compiler. It is therefore not a list
to append to. Current implementation results in these incorrect CFLAGS,
e.g., "-O2 -g -fblahblah;-UNDEBUG". Extending the CFLAGS this way
results in the proper CFLAGS, e.g., "-O2 -g -fblahblah -UNDEBUG".
2019-12-12 21:28:03 +01:00
Eric Haszlakiewicz
0819a55ffb
Undefine NDEBUG for tests - cmake version. See issue #501 .
2019-12-05 23:18:59 -05:00
Eric Haszlakiewicz
37b4da6b92
Merge pull request #501 from andy5995/iss_406-2
...
undefine NDEBUG for tests
2019-12-05 23:18:46 -05:00
Eric Haszlakiewicz
41f434e89f
Fix test_util_file for VS2013 too, but skip all the tests for anything older than that because the limitations are too inconvenient.
2019-11-23 23:55:04 -05:00
Eric Haszlakiewicz
b99be9cf4e
Fix up the test_util_file test for builds on Windows VS2015.
2019-11-23 23:14:24 -05:00
Eric Haszlakiewicz
7f30afc6e5
Fix some Windows compile issues, add JSON_EXPORT's, fix bogus character escapes, define __func__ and omit unistd.h if needed.
2019-11-23 20:31:14 -05:00
Eric Haszlakiewicz
bdaff94e9a
Build and run the tests as part of the cmake build.
2019-11-23 15:15:48 -05:00
Eric Haszlakiewicz
25aedddcdf
Fix memory leaks in test_double_serializer, and make sure all tests return 0 at the end of main().
2019-11-23 12:05:28 -05:00
Eric Haszlakiewicz
3d3b014971
Add a quick way (JSONC_TEST_TRACE=1) to turn on shell tracing in tests.
2019-11-23 12:03:27 -05:00