Milo Yip
b60bcc2762
Add MemoryBuffer and MemoryStream
2014-07-27 19:29:57 +08:00
Milo Yip
3d106085c1
Add a space in multiple root test for ensuring that whitespace is not consumed when done.
2014-07-27 17:29:03 +08:00
Milo Yip
e09b9d5c05
Merge remote-tracking branch 'origin/master' into issue75stopwhendone
2014-07-27 17:13:32 +08:00
Milo Yip
c81386413b
Add kParseStopWhenDoneFlag, its implementation and related unit tests
2014-07-27 17:10:32 +08:00
Milo Yip
2a389ad659
Merge remote-tracking branch 'origin/master' into IterativeParseOptimization
2014-07-27 15:50:16 +08:00
Milo Yip
c4ce48cde9
Merge pull request #80 from miloyip/issue31optimizeitoa
...
Issue31optimizeitoa
2014-07-27 15:49:36 +08:00
Milo Yip
8081e2a2c8
Add perf test cases for document using iterative parsing
2014-07-27 00:03:37 +08:00
Milo Yip
e3e8fea0f3
Remove stack size limit feature
...
It is not very useful for iterative parsing as the worst case of heap
size is O(n) where n is number of character in JSON, for the worst
synthetic cases. This is reasonable and should not create stack overflow
security problem as in recursive parsing.
2014-07-26 21:40:11 +08:00
Milo Yip
86b2f51a58
Use branchlut implementation for itoa conversion.
2014-07-25 00:08:24 +08:00
thebusytypist
140dc0664e
Fix compilation error(signed/unsigned comparison).
2014-07-18 01:08:07 +08:00
thebusytypist
afa59455a5
Fix compilation error(unused variable, signed/unsigned comparison).
2014-07-18 00:36:31 +08:00
miloyip
74a135678a
Add VC itoa perf comparison
2014-07-17 17:47:51 +08:00
miloyip
e1cdf1229e
Pass GCC compilation
2014-07-17 13:28:40 +08:00
Milo Yip
46eeb46a61
Implemented faster itoa with bit counting and reverse write
2014-07-17 02:26:20 +08:00
thebusytypist
fa25f93ddb
Merge remote-tracking branch 'upstream/master' into TransitionTable
2014-07-16 23:16:33 +08:00
thebusytypist
c3d7d8b38a
Revise unittests: should not expose implementation details.
2014-07-16 23:10:16 +08:00
miloyip
8b963dc7ad
Start benchmarking different itoa implementation
2014-07-16 19:14:00 +08:00
thebusytypist
1f53c6c041
Implement stack size limitation for iterative parsing.
2014-07-15 14:16:06 +08:00
miloyip
9974e35578
Merge conflicts and suppress VC warnings
2014-07-15 09:20:19 +08:00
thebusytypist
46e89dad0d
Add unittests for kParserErrorTermination; Fix bugs in last merge.
2014-07-15 00:51:34 +08:00
thebusytypist
d4da07c5fb
Merge upstream/master.
2014-07-14 23:49:57 +08:00
Milo Yip
b5436f7104
Add ASCII encoding which can fulfill #69
2014-07-13 23:51:56 +08:00
Milo Yip
5babae98e5
Add Writer::IsComplete()
2014-07-13 13:21:25 +08:00
Milo Yip
b234007713
Fixes #66 by adding Writer::Reset() and multiple root check
...
Note it redefines RAPIDJSON_ASSERT() to throw exception in unittest and
check for assertion with gtest.
2014-07-13 13:16:03 +08:00
Milo Yip
b55fcbd36a
Merge pull request #61 from miloyip/issue59terminate
...
Fixes #59 by adding bool return value for each event handler function
2014-07-12 23:42:50 +08:00
thebusytypist
face7240fe
Revise unittests of compound value(array or object)'s initial state transition.
2014-07-11 16:33:32 +08:00
thebusytypist
3038a7855e
Revise unittests: reset the handler before the transition which we are going to test.
2014-07-11 16:03:38 +08:00
thebusytypist
36434b66c8
Merge remote-tracking branch 'upstream/master' into TransitionTable
2014-07-11 12:52:07 +08:00
thebusytypist
70d01cc5f3
Complete unittests for state transition.
2014-07-11 11:43:09 +08:00
Philipp A. Hartmann
7a2e6e79c6
StrLen: align implementations
...
There are two copies of `StrLen` in the RapidJSON code base
* strfunc.h: rapidjson::internal::StrLen<Ch>
* unittest.h: Strlen<Ch>
To hide a warning on MSVC, align both implementations to use
'unsigned/SizeType' as return type and add an explicit cast.
2014-07-10 19:41:17 +02:00
Philipp A. Hartmann
3cdfb0dafe
rapidjsontest.cpp: silence a warning (C4244) on MSVC
2014-07-10 19:38:57 +02:00
Milo Yip
f1ae39f9e2
Fixed readertest compilation error
2014-07-11 00:37:55 +08:00
thebusytypist
55e97eada0
Add two basic performance tests.
2014-07-10 22:31:12 +08:00
thebusytypist
e3c4b33915
Add unittests for state transition.
2014-07-10 22:27:25 +08:00
Milo Yip
cc04219e36
Fixes #59 by adding bool return value for each event handler function
2014-07-10 19:33:01 +08:00
thebusytypist
f6235b2160
Add basic error handling.
2014-07-10 00:00:56 +08:00
Philipp A. Hartmann
9a89eed11a
adopt AddMember tests from #47 (726f986,b7bf73c)
2014-07-09 09:24:34 +02:00
Philipp A. Hartmann
8bbf41f7c7
update string API tests
2014-07-08 20:23:34 +02:00
Philipp A. Hartmann
6aa601cd51
perftest.h/unittest.h: fix pragma ordering
2014-07-08 15:12:02 +02:00
Philipp A. Hartmann
813da24d72
Add RAPIDJSON_DIAG_* macros to handle compiler warnings
...
Warning push/pop support has been added to GCC in version 4.6.0,
and pragmas to ignore certain warnings are present since 4.2.0.
This patch hides the compiler-specific warning push/pop/disable
pragmas behind a macro-based implementation (currently for MSVC and
clang /GCC.
This avoids warnings, as seen e.g. on GCC 4.4:
../../include/rapidjson/document.h:14: error: expected [error|warning|ignored] after ‘#pragma GCC diagnostic’
and earlier versions complaining about unknown pragmas being ignored.
Note: unittest.h and perftest.h need to check for compilers
explicitly, as rapidjson.h is not included there.
2014-07-08 14:45:19 +02:00
thebusytypist
6b0df217a8
WIP: refactor iterative parsing.
2014-07-08 02:19:35 +08:00
thebusytypist
7d33b01515
Bugfix: add missing transition from finish state.
2014-07-07 21:57:23 +08:00
thebusytypist
7acb0c181e
Rename flags/state names/functions/test cases from 'NonRecursive' to 'Iterative'.
2014-07-07 21:46:57 +08:00
thebusytypist
3006fa7d8c
Try to resolve issue #35 : implement iterative parsing.
2014-07-06 21:15:38 +08:00
Milo Yip
469333af8f
Fixes filename cases in source code
2014-07-04 17:03:58 +08:00
Milo Yip
ace56097fd
Fixes compilation error.
2014-07-04 16:56:19 +08:00
Milo Yip
0bff4ffd0c
Adds unit tests about streams.
2014-07-04 16:39:09 +08:00
Milo Yip
b01093b16c
Fixes a compilation error in Reader when using encoded stream.
...
Added unit test for parsing EncodedStream to Document.
2014-07-04 14:32:44 +08:00
Milo Yip
9ed11d29a2
Safer implementation of Swap()
...
Also added documentation, unit tests for swapping Document/Value,
Document/Document.
2014-07-04 00:59:16 +08:00
Philipp A. Hartmann
3254a784bb
add missing 'typename'
2014-07-03 17:13:17 +02:00