52 Commits

Author SHA1 Message Date
Etienne Laurin
123d7c89a4 add test for non-null-terminated token 2019-09-12 08:12:06 +01:00
Milo Yip
b56eb28575
Merge branch 'master' into pointer_less_than 2018-12-18 09:32:09 +08:00
ylavic
2ce91b823c Pointer tests now need <algorithm> (for std::swap), but no tabs. 2018-12-17 14:45:23 +01:00
ylavic
a66cf7924c Allow to (std::)Swap two pointers. 2018-12-17 14:33:32 +01:00
ylavic
eb6ee17d2d Speed up Pointer::operator<().
Speed is more important than alphabetical order (which makes few sense in
JSON in general, and with pointers especially). The use case is indexing
in std containers, i.e. O(log n) with rbtree, so the faster comparison
the better.
2018-12-12 22:32:56 +01:00
ylavic
0e34ed43f4 Rework Pointer::operator<() loop.
I must be too dumb to understand the mess MSVC (32bit only) did with the
previous loop, and to figure out how it might have make it never end.
Anyway, hopefully any compiler can grok this new loop...
2018-12-12 15:15:43 +01:00
ylavic
af17f196c6 Unit test for Pointer::operator<(). 2018-12-11 00:19:13 +01:00
Philipp A. Hartmann
0cc44c82c9
Update test/unittest/pointertest.cpp
Co-Authored-By: yhager <yhager@users.noreply.github.com>
2018-10-31 20:31:04 -07:00
Yuval Hager
a77b49dcb8 silence clang-7 self-assign-overloaded warning 2018-10-26 14:58:57 -07:00
Minmin Gong
ff76343336 Update the code to adapt the new gtest. 2018-07-16 20:36:20 -07:00
Étienne Dupuis
44f2f9aa53 Added relevant unit tests for issue #1108 suggested improvement. 2017-11-27 10:38:01 +01:00
Milo Yip
4a2f2729f1 Change from miloyip/rapidjson to Tencent/rapidjson 2017-09-13 17:03:23 +08:00
Milo Yip
56b7216efe Fix #949 about -Werror=conversion 2017-05-12 10:32:41 +08:00
Milo Yip
cec8dcbc7a Add optional unresolvedTokenIndex parameter to Pointer::Get() and related 2016-02-09 12:09:47 +08:00
Milo Yip
7f9921fc60 Merge branch 'master' into schema
# Conflicts:
#	.gitignore
#	include/rapidjson/internal/stack.h
2016-01-26 15:24:04 +08:00
Milo Yip
74c8dcfd57 Fix clang -Weverything 2015-12-18 18:34:04 +08:00
miloyip
8b265fe4b6 Fixes #489 2015-12-06 11:38:53 +08:00
Milo Yip
db0a03a43c Fix #483 by using the correct value type 2015-11-30 17:22:06 +08:00
Milo Yip
b8d2f7e660 Merge regex into schema 2015-05-29 18:39:16 +08:00
miloyip
c8c8ad47c3 Further improve coverage of GenericPointer::Erase() 2015-05-21 17:02:27 +08:00
miloyip
7ddaa80e46 Improve coverage of GenericPointer::Erase() 2015-05-21 16:45:39 +08:00
miloyip
f688b2b152 Improve coverage of Pointer 2015-05-21 13:25:37 +08:00
miloyip
0e4c368952 Merge branch 'master' into schema 2015-05-08 22:19:27 +08:00
miloyip
771fa9879a Add Pointer::Append(Value, Allocator) overload 2015-05-08 22:18:46 +08:00
Milo Yip
677af55f70 Merge remote-tracking branch 'origin/master' into schema 2015-05-08 21:50:25 +08:00
Milo Yip
5dee394004 Add Pointer::Append() and fixed bugs in assignment and Parse() 2015-05-08 21:26:56 +08:00
Milo Yip
24f060f7cb Refactor template parameters and add ISchemaValidator 2015-05-08 18:39:26 +08:00
Milo Yip
8c01e7e1ce Add Pointer::Erase() and EraseValueByPointer() 2015-05-04 21:50:26 +08:00
miloyip
436625f83c Fix ambiguous cases in Pointer::Create() 2015-05-04 15:02:43 +08:00
miloyip
fc7b0a04a1 Add const Value& version of SetValueByPointer() and improve coverage 2015-05-04 10:06:31 +08:00
miloyip
524974deec Add Validation of UTF-8 sequence for percent encoding, also improves coverage 2015-05-03 21:58:55 +08:00
miloyip
c35d47f83c Change copyright header of pointer test 2015-05-03 21:37:12 +08:00
miloyip
369cf2a8b7 Fix wcscmp() causing false alarm in Valgrind 2015-05-03 20:11:55 +08:00
miloyip
b55a9bcacb Try diagnosis Valgrind error 2015-05-03 19:58:25 +08:00
miloyip
f55002c9a2 Try to fix valgrind error 2015-05-03 19:27:12 +08:00
miloyip
bb0e828928 Some std::string overloads for Pointer 2015-05-03 18:55:55 +08:00
miloyip
0eb6cb8e5f Add equality/inequality operator, URI fragment stringify and UTF-8 Percent Encoding/Decoding 2015-05-03 14:14:05 +08:00
miloyip
28f14bd68f Add parsing of URI fragment representation of JSON pointer 2015-05-03 09:51:15 +08:00
miloyip
2ee15de4a9 Add no allocator overloads for Swap 2015-05-02 22:58:41 +08:00
miloyip
fd9386589f Add overloads for document as root, with no allocator parameter. 2015-05-02 22:46:30 +08:00
miloyip
d0d18847c5 Add GetValueByPointerWithDefault() overloads 2015-05-02 22:08:03 +08:00
miloyip
32b45f6e6d Add GetWithDefault() overloads 2015-05-02 21:52:49 +08:00
miloyip
2ddbd09031 Add '-' support for Create() and Set() 2015-05-02 21:30:40 +08:00
miloyip
2ece55abc7 Implement pointer parse error 2015-05-02 20:44:30 +08:00
miloyip
1ef380586d Fix a bug in Pointer::Create() and Add different overloads for Set() related implementations 2015-05-02 20:07:50 +08:00
miloyip
6ee691550f Move GenericPointer::kInvalidIndex to rapidjson::kPointerInvalidIndex
It is needed to prevent linking error for gcc/clang
2015-04-11 14:48:33 +08:00
Milo Yip
e0743b2fb0 Fix a clang/gcc warning 2015-04-10 22:43:46 +08:00
Milo Yip
26be3be5c7 Fix several clang/gcc warnings 2015-04-10 22:12:59 +08:00
Milo Yip
b2d72ef751 Add XXXByPointer() helper functions 2015-04-10 19:28:12 +08:00
Milo Yip
cf0ff19cac Add Pointer default/copy constructor, assignment operator. Test constructor with tokens 2015-04-10 18:25:02 +08:00