355 Commits

Author SHA1 Message Date
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
miloyip
a46d152218 Merge branch 'master' into issue120floatprecision 2014-08-28 23:05:27 +08:00
miloyip
d8a51bf2a1 Add test case 2014-08-28 23:03:06 +08: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
Milo Yip
0dbcc1cf2e Add license and change indents from tab to space. 2014-08-11 22:26:45 +08:00
Milo Yip
adb3974e4d Merge pull request #97 from miloyip/issue72customdtoa
Fix #72
2014-08-11 21:56:10 +08:00
Milo Yip
1900b7bace Remove double precision settings API in Writer 2014-08-09 21:37:02 +08:00
Milo Yip
a7762a3453 Custom dtoa() impleemntation
Modified from Milo's Grisu2 implementation. 99.9% cases return shortest
decimal format.
2014-08-09 21:12:58 +08:00
Milo Yip
f0955d327c Fixed a bug in perftest (was asserted in debug) 2014-08-09 20:35:48 +08:00
Milo Yip
b52e07822e Try to add erase-remove idiom in unit test but fail to compile on VC2013. 2014-08-01 00:04:31 +08:00
Philipp A. Hartmann
fc6d7a59dc GenericValue: rename Erase(ConstMemberIterator) to EraseMember 2014-07-31 13:16:56 +02:00
Philipp A. Hartmann
82b32a93d2 fix missing bracket 2014-07-31 13:06:28 +02:00
Philipp A. Hartmann
b98852e165 GenericValue: add tests for Erase(ConstMemberIterator[, ConstMemberIterator]) 2014-07-31 13:03:51 +02:00
miloyip
71ae5660ed Revert "Add Erase(ConstValueIterator) and Erase(ConstValueIterator,ConstValueIterator)"
This reverts commit 9ab2621e855a9abb8377520b42d6dfddcd49a8e1.
2014-07-31 18:56:57 +08:00
miloyip
9ab2621e85 Add Erase(ConstValueIterator) and Erase(ConstValueIterator,ConstValueIterator)
As std::vector::erase() overloads added in C++11
2014-07-31 18:53:17 +08:00
miloyip
71c8402549 Add equal-to and non-equal-to operators 2014-07-31 18:43:59 +08:00
miloyip
0f7d2dad51 Add 2 overloads of Erase() for removing elements of array. 2014-07-31 14:22:59 +08:00
Milo Yip
5456606232 Add a "must underflow" case as suggested by @pah 2014-07-31 00:02:02 +08:00
Milo Yip
808d362b88 Fix parsing numbers which are less than 1e-308
Overflow should check sign of exponent.
2014-07-30 23:27:17 +08:00
miloyip
fdd380bbc0 Added insitu parsing test for kParseStopWhenDoneFlag
Related to discussion in #83
2014-07-29 13:01:35 +08:00
Milo Yip
e6f344637b Merge pull request #83 from miloyip/issue75stopwhendone
Issue75stopwhendone
2014-07-28 18:45:06 +08:00
Milo Yip
c545895368 Merge pull request #84 from miloyip/issue79memorystreambuffer
Add MemoryBuffer and MemoryStream
2014-07-28 18:45:00 +08:00