213 Commits

Author SHA1 Message Date
Milo Yip
e04d66bdd8 Try to use EXPECT_NEAR 2015-04-10 23:47:53 +08:00
Milo Yip
c18812a36a Fix yet another -Wfloat-equal warning 2015-04-10 23:37:20 +08:00
Milo Yip
2524693cfd Suppress float-equal in readertest.cpp 2015-04-10 23:24:33 +08:00
Milo Yip
fb4f321d82 Fix another -Wfloat-equal warning 2015-04-10 23:10:08 +08:00
Milo Yip
53ed550a5e Merge remote-tracking branch 'origin/master' into issue287_WarningFloatEqual 2015-04-10 22:50:24 +08:00
Milo Yip
02aa12a29e Merge pull request #291 from miloyip/issue289_NegativeZeroRoundtrip
Fix #289 negative zero roundtrip (double only)
2015-04-10 21:53:58 +08:00
Milo Yip
f73ec57241 Add -Wfloat-equal to reproduce warnings 2015-04-10 21:30:42 +08:00
Milo Yip
e5cf3b85f3 Fix #289 negative zero roundtrip (double only) 2015-04-10 21:24:29 +08:00
Milo Yip
b7e34100ed Fix #288 double quote in unicode escape 2015-04-10 20:36:27 +08:00
Milo Yip
b8cc02e0aa Try to fix a compilation error on gcc/clang 2015-04-03 11:35:32 +08:00
Milo Yip
2d920e7e0f Add user buffer unit test 2015-04-03 11:25:19 +08:00
miloyip
978a3ab830 Fix VS2012 compilation fail in stringbuffertest 2015-03-23 17:30:25 +08:00
Milo Yip
3a4835e080 Merge pull request #258 from pah/fixes/ci-debug-noperftest
Skip running perftest on CI debug builds (Appveyer; Travis)
2015-03-13 09:56:33 -04:00
Philipp A. Hartmann
c14dff1675 Merge branch 'cmake-update' of @jollyroger (#244) 2015-03-10 20:28:30 +01: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
Andrii Senkovych
122170b362 Fix definitions for VS compiler 2015-02-23 20:21:07 +02:00
Philipp A. Hartmann
8341c413dd unittest.h: make sure to #include <stdexcept>
See https://github.com/miloyip/rapidjson/commit/a2a0d161#commitcomment-9838110
2015-02-20 20:29:31 +01:00
Andrii Senkovych
3ae2a29986 Backport compiler options from premake configuration. Refs #240. 2015-02-19 18:25:40 +02:00
Andrii Senkovych
9122a78a46 Add new unittests. Refs #240. 2015-02-19 18:25:40 +02:00
unknown
0cbafabe53 omit valgrind tests for Visual Studio builds 2015-02-17 11:14:47 +01:00
unknown
63ad11c367 add support for AppVeyor CI for checking Windows builds 2015-02-17 10:42:43 +01:00
Milo Yip
09118fa230 Merge pull request #192 from jollyroger/cmake
CMake support
2015-02-11 12:04:19 +08:00
Milo Yip
24dd7ef839 Merge branch 'movetestleak' 2015-01-14 23:03:04 +08:00
Milo Yip
7c47cd3498 Remove 2 unit tests which make memory leaks 2015-01-14 23:02:29 +08:00
Milo Yip
24563b28fb Correct Value(kStringType) and more assertions 2015-01-13 23:49:53 +08:00
Milo Yip
92554b52a2 Merge remote-tracking branch 'origin/master' into issue120floatprecision 2014-11-30 18:53:32 +08:00
Milo Yip
26491cff1e Fix additional compilation errors in unit tests for VC 2014-11-23 19:03:06 +08:00
Milo Yip
3679c280dd Merge remote-tracking branch 'origin/master' into issue120floatprecision_customstrtod 2014-11-23 08:48:03 +08:00
Milo Yip
c8bed6b8cc Fix compilation errors in unit tests for VC 2014-11-23 08:38:48 +08:00
Milo Yip
57b91300fb Merge remote-tracking branch 'origin/master' into issue120floatprecision_customstrtod
Conflicts:
	include/rapidjson/internal/dtoa.h
	test/unittest/readertest.cpp
2014-11-14 22:23:16 +08:00
Milo Yip
22ca9312df Fix gcc/clang compilation errors and turn off exhaustive number test 2014-11-14 18:36:25 +08:00
Milo Yip
40852f4d6d Fixes StrtodDiyFp bugs 2014-11-14 18:23:51 +08:00
Andriy Senkovych
bff9625e86 Add travis tests to be run from CTest 2014-11-12 01:57:00 +02:00
Andriy Senkovych
40648f164b Add namespacetest to the unit tests 2014-11-11 18:10:55 +02:00
Andriy Senkovych
8f3f0ea167 Add separate targets for examples and tests 2014-11-11 17:50:32 +02:00
Andriy Senkovych
d69991fa11 Set separate directory to place binaries 2014-11-11 17:26:59 +02:00
Andriy Senkovych
8ae1c971ea Add initial CMake support
* Support for both in-source and out-of-source builds
 * Set library version to 0.12 to map Debian package
 * Add separate options to build tests, examples and documentation
 * Add pkgconfig lookup support (if installed with `make install`)
 * Add CMake lookup support (if isntalled with `make install`)
 * Add Google Test Source lookup
 * Add CTest support for running tests (use `make test` or `ctest -V`)
2014-11-11 17:26:59 +02:00
Philipp A. Hartmann
7dc9b18f54 namespacetest.cpp: add test for separate namespace 2014-11-06 20:54:46 +01: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
miloyip
b4e2d58c74 Temp commit 2014-10-31 10:25:04 +08:00
Milo Yip
96f979a0c4 Merge pull request #187 from pah/fixes/sign-compare
DocumentMove tests: compiler error due to -Wsign-compare
2014-10-31 09:33:32 +08:00
Philipp A. Hartmann
1a31767dcf DocumentMove tests: compiler error due to -Wsign-compare
On GCC 4.9, the documenttest.cpp fails to compile in C++11 mode,
as the MoveConstructor/Assignment tests contain left-over
comparisons between signed and unsigned expressions.
2014-10-30 19:23:57 +01:00
Drew Noakes
0bfd0a5205 Add unit tests for StringBuffer. 2014-10-30 17:08:45 +00:00
Milo Yip
8fc0e57926 Merge pull request #177 from spl/use-deprecated
Use 'deprecated' instead of 'depreciated'
2014-10-27 14:53:29 +08:00
Sean Leather
32525a5d5e Use 'deprecated' instead of 'depreciated' 2014-10-26 14:51:35 +02:00
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
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