25 Commits

Author SHA1 Message Date
Daniil Kovalev
6b4a7b3b16 Fix iovec-related tests 2021-05-08 17:58:09 +03:00
Vincent Mallet
f06b46d412 Attempt to fix Windows build for tests.
Use sprintf_s (windows) or snprintf (others) instead of sprintf in unit tests.
2021-03-23 14:57:07 -07:00
Vincent Mallet
1c97e051ad Fixes #941
Don't abort serialization when running into empty strings in msgpack_object_print_buffer().
Added a couple of unit tests to test empty string cases.
2021-03-23 13:56:03 -07:00
yuangongji
b1725d4007 vrefbuffer: set default ref_size and chunk_size 2020-04-30 19:26:07 +08:00
Takatoshi Kondo
2e2e93ba2e Added compiler checking to pragma. 2019-12-25 14:39:57 +09:00
Torleiv Sundre
a6bf728a5c Correctly check return value of snprintf
In MSGPACK_CHECKED_CALL, the return value of snprintf is incorrectly
assumed to mean success if it is less than or equal to the buffer size.
The call should only be considered a success if the return value is less
than the buffer size.

This commit adds two unit tests that illustrates the issue and fixes the
issue, making the unit tests pass.
2019-12-04 14:20:12 +01:00
Takatoshi Kondo
17267ed475 Added -Wconversion support for C++. 2019-03-25 19:48:39 +09:00
tbeu
c056026dad Fix memory leaks 2018-09-04 22:24:40 +02:00
jwang
0421dabc1e removing unused vars 2018-09-03 22:23:54 +02:00
jwang
60930f4b12 adding unit tests and fixing same overflow issue in hpp files 2018-09-03 22:23:53 +02:00
Takatoshi Kondo
eebdc007a9 Added timestamp minimal support for C. 2018-07-22 20:38:36 +09:00
Takatoshi Kondo
56db4475f2 Fixed msvc2015. 2017-07-04 07:44:03 +09:00
Takatoshi Kondo
a7a78bde9b Fixed #598. 2017-06-08 09:26:05 +00:00
Luiz Silva
4a1db60af8 Fix compilation with Gtest 1.8.0 and GCC 5.4.1 2016-11-10 10:59:26 -02:00
Takatoshi Kondo
ccc9ac5538 Fixed #521.
Introduced new object type `FLOAT32` and `FLOAT64`.
`FLOAT64` is equivalent to `FLOAT`.
The both internal expressions are f64(double).
2016-10-11 23:23:06 +09:00
Yusuke Sasaki
b4c4c213b1 Add missing platform detection in examples/test 2016-06-18 03:38:42 +09:00
Takatoshi Kondo
e6f82cf2bb Fixed #463.
Added lacked include files.
Added a test.
Added MSVC build settings on appveyor.
Added old MSVC workaround.
Fixed a variable definition point to meet ANSI-C.
2016-05-14 22:05:10 +09:00
Takatoshi Kondo
1bfcf55469 Replaced msgpack::unpacked with msgpack::object_handle.
msgpack::unpacked is a typedef of the msgpack::object_handle.
I recommend using msgpack::object_handle. It can be used not only
holding unpacked msgpack objects but also msgpack::objects that are
created by any types.

Replaced unpack() APIs in test codes and examples. They used to use old
APIs.
2016-03-21 15:22:50 +09:00
Takatoshi Kondo
39e7856c48 Fixed #382.
Fixed warnings on gcc 4.1.2.
Added gcc version checking for adding -std=c++03 flag.
2015-11-12 00:20:21 +09:00
Nobuyuki Kubota
b13cb13efc Fix compile errors on OS X due to signed-unsigned comparison in tests 2015-08-10 11:29:57 -07:00
Takatoshi Kondo
34a42415be Added v4(old) raw packing support. 2015-06-30 15:11:51 +09:00
Takatoshi Kondo
737e6703df Fixed #191.
The names of float format family are changed.

old                      new
dec                   -> f64
MSGPACK_OBJECT_DOUBLE -> MSGPACK_OBJECT_FLOAT
msgpack::type::DOUBLE -> msgpack::type::FLOAT

Client codes could have compile errors when it use dec, MSGPACK_OBJECT_DOUBLE or msgpack::type::DOUBLE.
The best way to fix such errors, update client code. If it can't, set MSGPACK_USE_LEGACY_NAME_AS_FLOAT macro.
Then both old names and new names are available.
2015-01-16 00:20:43 +09:00
Takatoshi Kondo
bcdbf78542 Updated infinity test better way.
Added NaN tests.
2014-11-03 10:03:05 +09:00
Takatoshi Kondo
a4af97b32c Supported dll export for msvc.
Supported tests for msvc.
2014-11-02 20:16:20 +09:00
Takatoshi Kondo
6a8412d6de Separated msgpack_test.cpp.
Renamed test files.
Decreased test's loop counter to avoid travis-ci no output timeout.
The number of loops is not so meaningful.
2014-09-09 14:15:21 +09:00