683 Commits

Author SHA1 Message Date
Tom Briden
1f59c69cd1 valuetest: fix potential write of terminating nul past the end of the destination
Fixes 2 compile errors with gcc-12, eg:

tesunittest/valuetest.cpp:1516:30: error: 'sprintf' may write a terminating nul past the end of the destination [-Werror=format-overflow=]
test/unittest/valuetest.cpp:1516:20: note: 'sprintf' output between 2 and 11 bytes into a destination of size 10
2022-05-16 10:23:11 +08:00
ardb-uk
4bbaf28ffc
Add files via upload 2021-10-12 16:23:44 +01:00
Milo Yip
00dbcf2c6e
Merge pull request #1926 from Kyrega/master
Fix RawNumber for characters with sizeof(Ch) > sizeof(char)
2021-08-13 12:25:41 +08:00
Kyrega
22ee8b07c8 Correct WIStreamWrapper 2021-08-10 17:39:04 +02:00
Kyrega
e0512e0944 Using unsigned for WIStreamWrapper 2021-08-10 17:36:31 +02:00
Kyrega
b952a592a4 Fix RawNumber for longer char types 2021-08-10 17:35:07 +02:00
jack_perisich
bb06211088 Fix small errors in dtoa output for certain doubles 2021-07-27 19:50:51 -04:00
Milo Yip
48fbd8cd20
Merge pull request #1848 from smhdfdl/id-and-ref
Fix issue 1843 - support Id keyword
2021-07-09 10:57:40 +08:00
Steve Hanson
8d16abd980 Uri Parse improvements 2021-06-30 17:09:52 +01:00
Steve Hanson
a21cf9f7b8 equiv fix for issue 1899 2021-06-14 11:35:00 +01:00
Milo Yip
8c29a7b493 Fix Pointer::Append() crash for custom allocator on Windows
Fix #1899
2021-06-11 11:49:14 +08:00
Steve Hanson
3df804c128 fix coverage, unit test allocators and equality 2021-06-09 10:31:09 +01:00
Steve Hanson
6d253c160d remove compiler warning 2021-06-08 15:31:25 +01:00
Steve Hanson
28bcbd3f35 make std::string optional 2021-06-08 10:53:10 +01:00
Steve Hanson
494447b731 remove copyright & debug statements 2021-05-21 15:55:11 +01:00
Steve Hanson
6e58a53f44 fix coverage 2021-05-20 17:44:34 +01:00
Steve Hanson
3987d82f41 Merge branch 'master' of https://github.com/Tencent/rapidjson into id-and-ref 2021-05-20 12:20:12 +01:00
Hendrik Muhs
3cdfde14d6 replace auto with concrete type 2021-04-19 13:15:11 -07:00
Hendrik Muhs
d179facf90 don't let the GetObject macro rewrite the GetObject method, add a GetObj alias 2021-04-19 12:29:11 -07:00
Hendrik Muhs
3168d7c343 add a test that provokes a compile time error on windows 2021-04-18 18:06:35 +02:00
Milo Yip
7d801bbe45
Merge pull request #1503 from ylavic/sub_value_assignment
Fix (Sub-)Value assignment
2021-04-07 17:52:51 +08:00
ylavic
5c764d9a81 Tests for Allocators copy by rvalue reference. 2021-04-04 12:51:47 +02:00
ylavic
117276c413 Fix would-crash tests if the default allocator used were kNeedFree.
The allocator cannot be destroyed before the Document, otherwise the
Value destructor double frees.
2021-04-02 21:09:20 +02:00
ylavic
6bed9b266f Don't define StdAllocator<void> from C++17. 2021-03-30 13:47:04 +02:00
ylavic
02f42604bd Make StdAllocator C++17-20 compatible. 2021-03-28 23:48:14 +02:00
ylavic
2e6f761458 Tests for StdAllocator. 2021-03-16 01:03:04 +01:00
ylavic
50cb424c34 Test assignment from inner Value. 2021-03-15 23:57:42 +01:00
Steve Hanson
bc026e3fb5 satisfy all compilers 3 2021-03-11 18:25:10 +00:00
Steve Hanson
6b57738e4a handle internal refs properly 2021-03-11 14:49:28 +00:00
Steve Hanson
fe1a29ca69 fix platform-dependent compiler error with >> 2021-02-25 23:54:44 +00:00
Steve Hanson
ad73c032e7 fix compile errors 2021-02-25 22:51:35 +00:00
Steve Hanson
7698b3cd48 code and tests 2021-02-25 21:45:29 +00:00
Steve Hanson
9bb81e20ff fix crash where simple type with sub-schema has a bad value 2021-02-12 17:36:55 +00:00
Steve Hanson
167efb4fa0 work around issue 1089 2021-02-03 08:34:10 +00:00
Steve Hanson
28dc42d8d3 restore coverage 2021-01-29 19:20:01 +00:00
Steve Hanson
05e7b33977 code and tests 2021-01-28 12:11:43 +00:00
Krystian Chmura
cbf62de55d Add implicit conversion from Object and Array to Value (#1404)
Allows resolution of JSON Pointer on Object and Array
2021-01-05 14:20:57 +01:00
Xuanyi Zhou
5e50f27ed1 also initialize class member 2020-12-26 23:41:42 -05:00
Xuanyi Zhou
1e4f59d3ae add return statement & comment 2020-12-26 23:38:27 -05:00
Xuanyi Zhou
d742a030aa add body to private copy constructor & copy assignment 2020-12-26 23:27:43 -05:00
Xuanyi Zhou
13f5ab4f44 fix schema test compile error 2020-12-26 22:58:13 -05:00
Silas S. Brown
b7734d97c0 Remove unnecessary wording from BSD license not needed for MIT license (fixes #528) 2020-10-09 10:04:27 +01:00
escherstair
5fbf8bf89c fix unit test 2020-08-06 15:55:42 +02:00
escherstair
58e2964856 add unit test for clzll() 2020-08-06 14:57:39 +02:00
Lars Klein
6694c996b9 Add test case for low surrogate handling 2020-07-04 14:48:55 +02:00
xpahos
a895ce150f
Allow escaped apostrophe in values (#1639)
* Allow escaped apostrophe in values

* Allow escaped apostrophe in values

* Canonical flag name

* Add translation for escaped apostrophe

Co-authored-by: Milo Yip <miloyip@gmail.com>
2020-02-13 09:53:15 +08:00
Milo Yip
dfbe1db9da
Merge pull request #1502 from ylavic/compilation_fixes
Compilation fixes
2019-12-03 09:51:05 +08:00
Etienne Laurin
123d7c89a4 add test for non-null-terminated token 2019-09-12 08:12:06 +01:00
ylavic
92f99bc2ee RAPIDJSON_NOEXCEPT_ASSERT() should never throw.
clang warns about throwing from RAPIDJSON_NOEXCEPT_ASSERT() in a nothrow
context.

If RAPIDJSON_ASSERT() throws it can never be used for _NOEXCEPT_ASSERT(),
so use C assert() instead.

Finally (and originally), since RAPIDJSON_ASSERT() in "unittest.h" throws,
make it define RAPIDJSON_ASSERT_THROWS for RAPIDJSON_NOEXCEPT_ASSERT() to
now do the right thing.
2019-05-09 13:37:49 +02:00
Milo Yip
b56eb28575
Merge branch 'master' into pointer_less_than 2018-12-18 09:32:09 +08:00