76 Commits

Author SHA1 Message Date
Milo Yip
960324a95b Try to fix gcc compilation error 2016-02-13 23:07:26 +08:00
Milo Yip
2a78b4da8c Fix Value.String test compilation error 2016-02-13 22:11:12 +08:00
Milo Yip
0b098eb38d Rectify constness of Array 2016-02-13 22:09:14 +08:00
Milo Yip
59309b5dd2 Add GenericArray helper class with range-based for 2016-02-13 19:06:03 +08:00
Milo Yip
513fe7894e Add templated accessors for C string 2016-02-12 23:06:49 +08:00
Milo Yip
4d648fdcd8 Add templated accessors 2016-02-12 18:23:32 +08:00
Milo Yip
8b4c999888 Add Value::GetFloat(), Value::IsLossLessFloat/Double()
Fix #341
2016-02-12 16:33:31 +08:00
Milo Yip
c828037784 Make a stackoverflow solution 2016-02-06 16:55:15 +08:00
Milo Yip
d8c793f23f Disable type_traits 2016-01-23 15:27:59 +08:00
Milo Yip
a6eb15d274 Fix warnings in clang for C++11 2016-01-23 14:37:15 +08:00
Milo Yip
c6384da755 Try to fix clang and gcc warnings problems again x11 2015-12-18 20:53:07 +08:00
Milo Yip
6d6381f596 Try to fix clang and gcc warnings problems again x7 2015-12-18 20:15:11 +08:00
Milo Yip
d72039f3ef Try to fix clang and gcc warnings problems again x6 2015-12-18 20:06:58 +08:00
Milo Yip
d6478991d0 Try to fix clang and gcc warnings problems again x4 2015-12-18 19:54:10 +08:00
Milo Yip
74c8dcfd57 Fix clang -Weverything 2015-12-18 18:34:04 +08:00
Philipp A. Hartmann
46e1696316 add free inline swap functions 2015-07-13 09:35:15 +02:00
miloyip
6e1d10ec6b Add GenericValue::EraseMember(string types) APIs 2015-05-21 16:12:33 +08:00
miloyip
2786103abd Add Value::XXXMember(...) overloads for std::string 2015-05-12 22:48:14 +08:00
miloyip
8d39282af5 Update license headers for tests 2015-04-18 21:41:38 +08:00
miloyip
933c4a6cb1 Improve Value deep-clone coverage 2015-04-13 23:12:57 +08:00
miloyip
59ffb9e5f0 Try to fix a gcc/clang error 2015-04-13 18:32:11 +08:00
miloyip
d439f989bf Add valuetest coverage 2015-04-13 18:10:07 +08:00
Milo Yip
d7ad55f49e Another two warnings 2015-04-11 00:20:10 +08:00
Milo Yip
09448e980b Another warning in valuetest 2015-04-11 00:12:15 +08:00
Milo Yip
2452afbf3c Fix -Wfloat-equal warnings in Value::operator== and valuetest 2015-04-11 00:02:17 +08:00
Philipp A. Hartmann
06c3ddbac5 GenericValue::AddMember<T>: add missing overload (closes #254)
As discovered by @felipegb94, there are missing overloads to the
`GenericValue::AddMember<T>` template function, taking an explicit
`GenericValue&` as a name and accepting arbitrary primitive values.

This patch adds the missing overloads. The `StringRefType` overload
is needed to disambiguate the addition of a string literal as
value.

Some tests are added to `TEST(Value, Object)` in `valuetest.cpp`.
2015-03-10 19:11:27 +01:00
unknown
63ad11c367 add support for AppVeyor CI for checking Windows builds 2015-02-17 10:42:43 +01:00
Milo Yip
24563b28fb Correct Value(kStringType) and more assertions 2015-01-13 23:49:53 +08:00
Milo Yip
c8bed6b8cc Fix compilation errors in unit tests for VC 2014-11-23 08:38:48 +08:00
Drew Noakes
6aa664eeef Document traits of types using <type_traits> and static_assert in tests.
The tests state the current traits of types Document, Value and
StringBuffer. There are slight differences between them. It seems like a
good idea to extend this approach across more types, and to review the
expected traits across the board.
2014-10-31 11:00:57 +00:00
Zhihao Yuan
7303d92990 Disambiguate GenericValue's [0] and ["string"] 2014-10-23 21:50:39 -04: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
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
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