173 Commits

Author SHA1 Message Date
ecorm
fd12dcb3db Added MemoryPoolAllocator to GenericDocument moveunit tests. Added comment in GenericDocument move assignment operator explaining why the static_cast is needed to move the base class. 2014-10-24 14:05:32 -03:00
ecorm
cb33f910c3 Merge branch 'master' into issue123movesupport 2014-10-24 03:11:34 -03:00
ecorm
02f3b00ee6 Implemented C++11 move semantics for GenericDocument 2014-10-24 02:51:17 -03:00
Zhihao Yuan
7303d92990 Disambiguate GenericValue's [0] and ["string"] 2014-10-23 21:50:39 -04:00
Milo Yip
89fa782240 Merge pull request #166 from spl/fix-memorystream-peek
Fix MemoryStream::Peek() and add test for fix
2014-10-23 12:46:33 +08:00
Milo Yip
1c07239b61 Merge pull request #165 from spl/perf-test-encoded-and-autoutf-input-streams
Add perf tests for EncodedInputStream and AutoUTFInputStream
2014-10-23 12:45:55 +08:00
Sean Leather
0e715872c0 Fix MemoryStream::Peek() and add test for fix
MemoryStream::Peek() did not return '\0' if src_ == end_, but Peek() == '\0' is
used in parsing in the GenericReader. Without this change, parsing with
MemoryStream as the InputStream could result in a segmentation fault.
2014-10-23 00:31:19 +02:00
Sean Leather
8b9f12ef4f Add perf tests for EncodedInputStream and AutoUTFInputStream 2014-10-17 23:25:20 +02:00
Sean Leather
4ded1f44f4 Use predefined macros to enable SSE with gmake 2014-10-17 22:44:07 +02:00
Kosta
25f4892aa1 removed unused argument names 2014-09-04 15:56:21 +02:00
Kosta
8b2faff981 enhance IterativeParsingReaderHandler to check for Key() events 2014-09-04 15:51:09 +02:00
Kosta
23b3d24355 add Key() to IterativeParsingReaderHandler in readertest.cpp` 2014-09-04 15:24:52 +02:00
Milo Yip
bc9d7866be Merge pull request #128 from pah/feature/cxx11-move
Initial C++11 move support
2014-09-03 09:37:35 +08:00
Milo Yip
15d70d6a7b Merge pull request #127 from pah/feature/value-different-allocators
GenericValue: accept values with different allocators for read-only access
2014-09-03 09:37:15 +08:00
Kosta
08e81097eb final fix for the unit test case... 2014-09-01 12:54:50 +02:00
Kosta
ba05ea52cf use rapidjson::Value::SizeType as the type for storing and comparing the string length 2014-09-01 12:52:36 +02:00
Kosta
609997565c unit test simplification for short string optimization 2014-09-01 12:46:04 +02:00
Kosta
88debcf02e typo fixed for the unit test implementation 2014-09-01 12:40:28 +02:00
Kosta
056d0dafe4 add unit test for testing edge cases of the short string optimization 2014-09-01 12:34:43 +02:00
Philipp A. Hartmann
47c32eee6b valuetest: add test for Uint64 comparisons 2014-08-31 19:01:16 +02:00
Philipp A. Hartmann
36031b1b6f valuetest: add tests for rvalue references, reenable erase/remove pattern 2014-08-31 17:32:31 +02:00
Philipp A. Hartmann
a9d2b75179 valuetest: avoid underscores in GoogleTest tests
See https://code.google.com/p/googletest/wiki/FAQ#Why_should_not_test_case_names_and_test_names_contain_underscore
2014-08-31 17:32:31 +02:00
Philipp A. Hartmann
c1c9ba7c59 always define RAPIDJSON_HAS_STDSTRING (default: 0) 2014-08-31 17:32:31 +02:00
Philipp A. Hartmann
a2a0d16167 unittest.h: simplify AssertException
Some compilers warn about the missing initialisation of the std::exception
base class of the AssertException helper.  The simplest solution is to
inherit from std::logic_error instead, which provides all of the required
functionality already.
2014-08-31 11:08:33 +02:00
Philipp A. Hartmann
ffed1d67c1 valuetest: more testing of MemberCount 2014-08-31 11:01:05 +02:00
Philipp A. Hartmann
c597505761 valuetest: test member operations with different allocators 2014-08-31 11:01:05 +02:00
Philipp A. Hartmann
a40dcb9525 valuetest: always test comparisons with different allocators 2014-08-31 11:01:05 +02:00
Milo Yip
ab8416e1e6 Merge pull request #125 from pah/fixes/113
Fix comparison operator ambiguities between Value/Document
2014-08-31 07:31:45 +08:00
Philipp A. Hartmann
d63a40a05d valuetest: extended value comparison tests
Prepare equalto_operator tests to test comparisons between
 * GenericValue and GenericDocument
 * GenericValue with different SourceAllocator types

Both combinations currently fail due to ambiguities with the
templated operators on several compilers.
2014-08-30 12:39:39 +02:00
Milo Yip
1fafc38ee2 Merge pull request #122 from miloyip/issue114tmpnam
Replace tmpname() by mkstemp() on non-MSVC compilers
2014-08-29 00:01:12 +09:00
miloyip
6f4c83ad30 Replace tmpname() by mkstemp() on non-MSVC compilers 2014-08-28 22:19:56 +08:00
Milo Yip
284dcf3dc5 Change MemberEmpty() to ObjectEmpty() 2014-08-28 20:25:41 +08:00
Milo Yip
dc834c9c03 Add Value::MemberCount(), MemberEmpty(), RemoveAllMembers() 2014-08-27 23:14:17 +08:00
Philipp A. Hartmann
889f3fa9c0 valuetest: add tests for member iterator conversions/relations 2014-08-21 10:47:00 +02:00
Philipp A. Hartmann
2e0b8730a1 add tests for RAPIDJSON_HAS_STDSTRING 2014-08-20 07:07:55 +02:00
Milo Yip
d6513e251c Fix a gcc compilation error 2014-08-17 18:55:36 +08:00
Milo Yip
941aa93f45 Separate Document's value and stack allocator.
Use CrtAllocator for stack.
ShrinkToFit stack after parsing.
2014-08-17 18:33:47 +08:00
Milo Yip
3714019819 Add ShrinkToFit() to StringBuffer and MemoryBuffer 2014-08-17 18:32:08 +08:00
Milo Yip
143bb83e74 Merge pull request #101 from pah/feature/rfc7159
Move to RFC7159 (closes #90)
2014-08-12 00:10:53 +08:00
Philipp A. Hartmann
6863033652 readertest.cpp: remove remaining use of private functions 2014-08-11 17:27:38 +02:00
Philipp A. Hartmann
453eda5f94 tabs to 4 spaces (following 0dbcc1cf) 2014-08-11 17:22:11 +02:00
Philipp A. Hartmann
d84c051564 jsoncheckertest: add checks for iterative parser as well 2014-08-11 17:15:07 +02:00
Philipp A. Hartmann
834109557d readertest.cpp: use CRTP to activate "ADD_FAILURE()" calls in handlers 2014-08-11 17:15:07 +02:00
Philipp A. Hartmann
e29a4521b1 readertest.cpp: use top-level Parse functions, instead of internal ones
With the allowance of arbitrary root value types, the individual tests
can use the top-level Parse functions, instead of ParseFoo() variants.

Secondly, some unneeded array wrappers have been dropped and non-singular
tests starting with other values than objects or arrays have been added.
2014-08-11 17:14:31 +02:00
Philipp A. Hartmann
c256752668 readertest: drop object/array root restriction tests 2014-08-11 17:14:31 +02:00
Philipp A. Hartmann
e45557e28e writertest: add some roundtrip tests for non-compound root values 2014-08-11 17:14:31 +02:00
Philipp A. Hartmann
c0c0c398b6 jsoncheckertest: skip "fail1.json", as it is now accepted by RapidJSON 2014-08-11 17:14:31 +02:00
Philipp A. Hartmann
8d53689432 (Pretty)Writer: drop restriction to object/array roots 2014-08-11 17:14:31 +02:00
Philipp A. Hartmann
fc1e956a0c fix sign-comparison warning/error 2014-08-11 16:57:23 +02:00
Milo Yip
86245ce97a Remove cppformat and strtk 2014-08-11 22:40:13 +08:00