mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-06-25 22:15:23 +02:00
commit
e6c276edf3
2
.github/workflows/gha.yml
vendored
2
.github/workflows/gha.yml
vendored
@ -315,6 +315,6 @@ jobs:
|
|||||||
echo $env:BOOST_ROOT
|
echo $env:BOOST_ROOT
|
||||||
$env:DBOOST_ROOT="$env:Boost_ROOT"
|
$env:DBOOST_ROOT="$env:Boost_ROOT"
|
||||||
Start-Process cmake -ArgumentList "-DBOOST_ROOT=""$env:BOOST_ROOT"" $CPP11 $BOOST $X3_PARSE -DGTEST_LIBRARY=""$CUR\googletest-release-1.7.0\build\Release\gtest.lib"" -DGTEST_MAIN_LIBRARY=""$CUR\googletest-release-1.7.0\build\Release\gtest_main.lib"" -DGTEST_INCLUDE_DIR=""$CUR\googletest-release-1.7.0\include"" -DZLIB_LIBRARY=""$CUR\zlib-1.2.11\build\Release\zlib.lib"" -DZLIB_INCLUDE_DIR=""$CUR\zlib-1.2.11"" -DCMAKE_CXX_FLAGS=""/D_VARIADIC_MAX=10 /EHsc /D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING"" .." -NoNewWindow -Wait
|
Start-Process cmake -ArgumentList "-DBOOST_ROOT=""$env:BOOST_ROOT"" $CPP11 $BOOST $X3_PARSE -DGTEST_LIBRARY=""$CUR\googletest-release-1.7.0\build\Release\gtest.lib"" -DGTEST_MAIN_LIBRARY=""$CUR\googletest-release-1.7.0\build\Release\gtest_main.lib"" -DGTEST_INCLUDE_DIR=""$CUR\googletest-release-1.7.0\include"" -DZLIB_LIBRARY=""$CUR\zlib-1.2.11\build\Release\zlib.lib"" -DZLIB_INCLUDE_DIR=""$CUR\zlib-1.2.11"" -DCMAKE_CXX_FLAGS=""/D_VARIADIC_MAX=10 /EHsc /D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING"" .." -NoNewWindow -Wait
|
||||||
cmake --build . --config Release
|
cmake --build . --config Release -v
|
||||||
$env:PATH="$env:PATH;$CUR\googletest-release-1.7.0\build\Release;$CUR\zlib-1.2.11\build\Release;$CUR\build\release"
|
$env:PATH="$env:PATH;$CUR\googletest-release-1.7.0\build\Release;$CUR\zlib-1.2.11\build\Release;$CUR\build\release"
|
||||||
ctest -V
|
ctest -V
|
||||||
|
@ -313,6 +313,14 @@ IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
|
|||||||
ENDIF ()
|
ENDIF ()
|
||||||
ENDIF ()
|
ENDIF ()
|
||||||
|
|
||||||
|
IF ("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")
|
||||||
|
IF (CMAKE_C_FLAGS MATCHES "/W[0-4]")
|
||||||
|
STRING(REGEX REPLACE "/W[0-4]" "/W3 /WX" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
|
||||||
|
ELSE ()
|
||||||
|
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W3 /WX")
|
||||||
|
ENDIF ()
|
||||||
|
ENDIF ()
|
||||||
|
|
||||||
IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC90" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC10")
|
IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC90" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC10")
|
||||||
SET_SOURCE_FILES_PROPERTIES(${msgpackc_SOURCES} PROPERTIES LANGUAGE CXX)
|
SET_SOURCE_FILES_PROPERTIES(${msgpackc_SOURCES} PROPERTIES LANGUAGE CXX)
|
||||||
ENDIF ()
|
ENDIF ()
|
||||||
|
@ -55,7 +55,7 @@ build_script:
|
|||||||
- md build
|
- md build
|
||||||
- cd build
|
- cd build
|
||||||
- cmake -G %msvc% %cpp11% %boost% %x3_parse% -DGTEST_LIBRARY=%APPVEYOR_BUILD_FOLDER%\googletest-release-1.7.0\build\Release\gtest.lib -DGTEST_MAIN_LIBRARY=%APPVEYOR_BUILD_FOLDER%\googletest-release-1.7.0\build\Release\gtest_main.lib -DGTEST_INCLUDE_DIR=%APPVEYOR_BUILD_FOLDER%\googletest-release-1.7.0\include -DZLIB_LIBRARY=%APPVEYOR_BUILD_FOLDER%\zlib-1.2.11\build\Release\zlib.lib -DZLIB_INCLUDE_DIR=%APPVEYOR_BUILD_FOLDER%\zlib-1.2.11 -DCMAKE_CXX_FLAGS='"/D_VARIADIC_MAX=10 /EHsc"' ..
|
- cmake -G %msvc% %cpp11% %boost% %x3_parse% -DGTEST_LIBRARY=%APPVEYOR_BUILD_FOLDER%\googletest-release-1.7.0\build\Release\gtest.lib -DGTEST_MAIN_LIBRARY=%APPVEYOR_BUILD_FOLDER%\googletest-release-1.7.0\build\Release\gtest_main.lib -DGTEST_INCLUDE_DIR=%APPVEYOR_BUILD_FOLDER%\googletest-release-1.7.0\include -DZLIB_LIBRARY=%APPVEYOR_BUILD_FOLDER%\zlib-1.2.11\build\Release\zlib.lib -DZLIB_INCLUDE_DIR=%APPVEYOR_BUILD_FOLDER%\zlib-1.2.11 -DCMAKE_CXX_FLAGS='"/D_VARIADIC_MAX=10 /EHsc"' ..
|
||||||
- cmake --build . --config Release
|
- cmake --build . --config Release -v
|
||||||
|
|
||||||
test_script:
|
test_script:
|
||||||
- set PATH=%PATH%;%APPVEYOR_BUILD_FOLDER%\googletest-release-1.7.0\build\Release;%APPVEYOR_BUILD_FOLDER%\zlib-1.2.11\build\Release;%APPVEYOR_BUILD_FOLDER%\build\release
|
- set PATH=%PATH%;%APPVEYOR_BUILD_FOLDER%\googletest-release-1.7.0\build\Release;%APPVEYOR_BUILD_FOLDER%\zlib-1.2.11\build\Release;%APPVEYOR_BUILD_FOLDER%\build\release
|
||||||
|
@ -15,19 +15,19 @@ FOREACH (source_file ${exec_PROGRAMS})
|
|||||||
TARGET_LINK_LIBRARIES (${source_file_we}
|
TARGET_LINK_LIBRARIES (${source_file_we}
|
||||||
msgpackc
|
msgpackc
|
||||||
)
|
)
|
||||||
IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
IF ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
|
||||||
SET_PROPERTY (TARGET ${source_file_we} APPEND_STRING PROPERTY COMPILE_FLAGS " -Wall -Wextra")
|
SET_PROPERTY (TARGET ${source_file_we} APPEND_STRING PROPERTY COMPILE_FLAGS " -Wall -Wextra")
|
||||||
ENDIF ()
|
ENDIF ()
|
||||||
|
|
||||||
IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
IF ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
|
||||||
SET_PROPERTY (TARGET ${source_file_we} APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-mismatched-tags")
|
SET_PROPERTY (TARGET ${source_file_we} APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-mismatched-tags")
|
||||||
ENDIF ()
|
ENDIF ()
|
||||||
|
|
||||||
IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
|
IF ("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")
|
||||||
IF (CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
|
IF (CMAKE_C_FLAGS MATCHES "/W[0-4]")
|
||||||
STRING(REGEX REPLACE "/W[0-4]" "/W3 /WX" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
STRING(REGEX REPLACE "/W[0-4]" "/W3 /WX" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
|
||||||
ELSE ()
|
ELSE ()
|
||||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W3 /WX")
|
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W3 /WX")
|
||||||
ENDIF ()
|
ENDIF ()
|
||||||
ENDIF ()
|
ENDIF ()
|
||||||
ENDFOREACH ()
|
ENDFOREACH ()
|
||||||
|
@ -96,10 +96,10 @@ FOREACH (source_file ${check_PROGRAMS})
|
|||||||
ENDIF ()
|
ENDIF ()
|
||||||
|
|
||||||
IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
|
IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
|
||||||
IF (CMAKE_CXX_FLAGS MATCHES "/W[0-4] /WX")
|
IF (CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
|
||||||
STRING(REGEX REPLACE "/W[0-4]" "/W3 /WX" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
STRING(REGEX REPLACE "/W[0-4]" "/W3 /WX" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||||
ELSE ()
|
ELSE ()
|
||||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W3")
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W3 /WX")
|
||||||
ENDIF ()
|
ENDIF ()
|
||||||
ENDIF ()
|
ENDIF ()
|
||||||
ENDFOREACH ()
|
ENDFOREACH ()
|
||||||
|
@ -3,12 +3,16 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wconversion"
|
#pragma GCC diagnostic ignored "-Wconversion"
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
@ -3,12 +3,16 @@
|
|||||||
#include <iterator>
|
#include <iterator>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wconversion"
|
#pragma GCC diagnostic ignored "-Wconversion"
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
@ -2,12 +2,16 @@
|
|||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wconversion"
|
#pragma GCC diagnostic ignored "-Wconversion"
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
|
@ -2,13 +2,16 @@
|
|||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wconversion"
|
#pragma GCC diagnostic ignored "-Wconversion"
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
@ -2,12 +2,16 @@
|
|||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wconversion"
|
#pragma GCC diagnostic ignored "-Wconversion"
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
@ -3,12 +3,16 @@
|
|||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wconversion"
|
#pragma GCC diagnostic ignored "-Wconversion"
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
@ -4,12 +4,16 @@
|
|||||||
#include <msgpack/zbuffer.hpp>
|
#include <msgpack/zbuffer.hpp>
|
||||||
#include <msgpack/zbuffer.h>
|
#include <msgpack/zbuffer.h>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wconversion"
|
#pragma GCC diagnostic ignored "-Wconversion"
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
@ -1,11 +1,15 @@
|
|||||||
#include <msgpack.hpp>
|
#include <msgpack.hpp>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wconversion"
|
#pragma GCC diagnostic ignored "-Wconversion"
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
|
@ -1,12 +1,16 @@
|
|||||||
#include <msgpack.hpp>
|
#include <msgpack.hpp>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wconversion"
|
#pragma GCC diagnostic ignored "-Wconversion"
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
static void feed_file(msgpack::unpacker& pac, const char* path)
|
static void feed_file(msgpack::unpacker& pac, const char* path)
|
||||||
{
|
{
|
||||||
|
@ -1,11 +1,15 @@
|
|||||||
#include <msgpack.hpp>
|
#include <msgpack.hpp>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wconversion"
|
#pragma GCC diagnostic ignored "-Wconversion"
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
class enum_member {
|
class enum_member {
|
||||||
public:
|
public:
|
||||||
|
@ -1,11 +1,15 @@
|
|||||||
#include <msgpack.hpp>
|
#include <msgpack.hpp>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wconversion"
|
#pragma GCC diagnostic ignored "-Wconversion"
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
void check_size(size_t size) {
|
void check_size(size_t size) {
|
||||||
|
@ -1,11 +1,15 @@
|
|||||||
#include <msgpack.h>
|
#include <msgpack.h>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wconversion"
|
#pragma GCC diagnostic ignored "-Wconversion"
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
TEST(fixint, size)
|
TEST(fixint, size)
|
||||||
{
|
{
|
||||||
|
@ -1,9 +1,13 @@
|
|||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wconversion"
|
#pragma GCC diagnostic ignored "-Wconversion"
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#include "../fuzz/unpack_pack_fuzzer.cpp"
|
#include "../fuzz/unpack_pack_fuzzer.cpp"
|
||||||
|
|
||||||
|
@ -1,11 +1,15 @@
|
|||||||
#include <msgpack.hpp>
|
#include <msgpack.hpp>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wconversion"
|
#pragma GCC diagnostic ignored "-Wconversion"
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
@ -2,12 +2,16 @@
|
|||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wconversion"
|
#pragma GCC diagnostic ignored "-Wconversion"
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
TEST(json, basic_elements)
|
TEST(json, basic_elements)
|
||||||
{
|
{
|
||||||
|
@ -1,11 +1,15 @@
|
|||||||
#include <msgpack.hpp>
|
#include <msgpack.hpp>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wconversion"
|
#pragma GCC diagnostic ignored "-Wconversion"
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
|
@ -9,12 +9,16 @@
|
|||||||
#include <list>
|
#include <list>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wconversion"
|
#pragma GCC diagnostic ignored "-Wconversion"
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#if defined(_MSC_VER) || defined(__MINGW32__)
|
#if defined(_MSC_VER) || defined(__MINGW32__)
|
||||||
#define msgpack_rand() ((double)rand() / RAND_MAX)
|
#define msgpack_rand() ((double)rand() / RAND_MAX)
|
||||||
|
@ -4,12 +4,16 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wconversion"
|
#pragma GCC diagnostic ignored "-Wconversion"
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#if defined(_MSC_VER) || defined(__MINGW32__)
|
#if defined(_MSC_VER) || defined(__MINGW32__)
|
||||||
#define msgpack_rand() ((double)rand() / RAND_MAX)
|
#define msgpack_rand() ((double)rand() / RAND_MAX)
|
||||||
|
@ -12,12 +12,16 @@
|
|||||||
|
|
||||||
#include "test_allocator.hpp"
|
#include "test_allocator.hpp"
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wconversion"
|
#pragma GCC diagnostic ignored "-Wconversion"
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
@ -1,11 +1,15 @@
|
|||||||
#include <msgpack.hpp>
|
#include <msgpack.hpp>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wconversion"
|
#pragma GCC diagnostic ignored "-Wconversion"
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
@ -883,7 +887,7 @@ TEST(MSGPACK_CHRONO, system_clock_32)
|
|||||||
msgpack::sbuffer sbuf;
|
msgpack::sbuffer sbuf;
|
||||||
msgpack::pack(sbuf, val1);
|
msgpack::pack(sbuf, val1);
|
||||||
char packed[] = {
|
char packed[] = {
|
||||||
static_cast<char>(0xd6),
|
static_cast<char>(0xd6u),
|
||||||
static_cast<char>(-1),
|
static_cast<char>(-1),
|
||||||
static_cast<char>(0x12),
|
static_cast<char>(0x12),
|
||||||
static_cast<char>(0x34),
|
static_cast<char>(0x34),
|
||||||
@ -908,12 +912,12 @@ TEST(MSGPACK_CHRONO, system_clock_32_max)
|
|||||||
msgpack::sbuffer sbuf;
|
msgpack::sbuffer sbuf;
|
||||||
msgpack::pack(sbuf, val1);
|
msgpack::pack(sbuf, val1);
|
||||||
char packed[] = {
|
char packed[] = {
|
||||||
static_cast<char>(0xd6),
|
static_cast<char>(0xd6u),
|
||||||
static_cast<char>(-1),
|
static_cast<char>(-1),
|
||||||
static_cast<char>(0xff),
|
static_cast<char>(0xffu),
|
||||||
static_cast<char>(0xff),
|
static_cast<char>(0xffu),
|
||||||
static_cast<char>(0xff),
|
static_cast<char>(0xffu),
|
||||||
static_cast<char>(0xff)
|
static_cast<char>(0xffu)
|
||||||
};
|
};
|
||||||
EXPECT_EQ(memcmp(sbuf.data(), packed, sizeof(packed)), 0);
|
EXPECT_EQ(memcmp(sbuf.data(), packed, sizeof(packed)), 0);
|
||||||
|
|
||||||
@ -959,28 +963,28 @@ TEST(MSGPACK_CHRONO, system_clock_64_max)
|
|||||||
msgpack::sbuffer sbuf;
|
msgpack::sbuffer sbuf;
|
||||||
msgpack::pack(sbuf, val1);
|
msgpack::pack(sbuf, val1);
|
||||||
char packed_nano[] = {
|
char packed_nano[] = {
|
||||||
static_cast<char>(0xd7),
|
static_cast<char>(0xd7u),
|
||||||
static_cast<char>(-1),
|
static_cast<char>(-1),
|
||||||
static_cast<char>(0xee), // 999,999,999 << 2
|
static_cast<char>(0xeeu), // 999,999,999 << 2
|
||||||
static_cast<char>(0x6b),
|
static_cast<char>(0x6b),
|
||||||
static_cast<char>(0x27),
|
static_cast<char>(0x27),
|
||||||
static_cast<char>(0xfc),
|
static_cast<char>(0xfcu),
|
||||||
static_cast<char>(0xff), // 32 bit sec
|
static_cast<char>(0xffu), // 32 bit sec
|
||||||
static_cast<char>(0xff),
|
static_cast<char>(0xffu),
|
||||||
static_cast<char>(0xff),
|
static_cast<char>(0xffu),
|
||||||
static_cast<char>(0xff)
|
static_cast<char>(0xffu)
|
||||||
};
|
};
|
||||||
char packed_micro[] = {
|
char packed_micro[] = {
|
||||||
static_cast<char>(0xd7),
|
static_cast<char>(0xd7u),
|
||||||
static_cast<char>(-1),
|
static_cast<char>(-1),
|
||||||
static_cast<char>(0xee), // 999,999,000 << 2
|
static_cast<char>(0xeeu), // 999,999,000 << 2
|
||||||
static_cast<char>(0x6b),
|
static_cast<char>(0x6b),
|
||||||
static_cast<char>(0x18),
|
static_cast<char>(0x18),
|
||||||
static_cast<char>(0x60),
|
static_cast<char>(0x60),
|
||||||
static_cast<char>(0xff), // 32 bit sec
|
static_cast<char>(0xffu), // 32 bit sec
|
||||||
static_cast<char>(0xff),
|
static_cast<char>(0xffu),
|
||||||
static_cast<char>(0xff),
|
static_cast<char>(0xffu),
|
||||||
static_cast<char>(0xff)
|
static_cast<char>(0xffu)
|
||||||
};
|
};
|
||||||
if (std::chrono::system_clock::duration::period::ratio::den == 1000000000) {
|
if (std::chrono::system_clock::duration::period::ratio::den == 1000000000) {
|
||||||
EXPECT_EQ(memcmp(sbuf.data(), packed_nano, sizeof(packed_nano)), 0);
|
EXPECT_EQ(memcmp(sbuf.data(), packed_nano, sizeof(packed_nano)), 0);
|
||||||
@ -1056,7 +1060,7 @@ TEST(MSGPACK_TIMESPEC, timespec_pack_convert_zero)
|
|||||||
|
|
||||||
msgpack::pack(ss, val1);
|
msgpack::pack(ss, val1);
|
||||||
std::string const& str = ss.str();
|
std::string const& str = ss.str();
|
||||||
EXPECT_EQ(str.data()[0], static_cast<char>(0xd6));
|
EXPECT_EQ(str.data()[0], static_cast<char>(0xd6u));
|
||||||
|
|
||||||
msgpack::object_handle oh;
|
msgpack::object_handle oh;
|
||||||
msgpack::unpack(oh, str.data(), str.size());
|
msgpack::unpack(oh, str.data(), str.size());
|
||||||
@ -1082,7 +1086,7 @@ TEST(MSGPACK_TIMESPEC, timespec_pack_convert_32bit_sec)
|
|||||||
|
|
||||||
msgpack::pack(ss, val1);
|
msgpack::pack(ss, val1);
|
||||||
std::string const& str = ss.str();
|
std::string const& str = ss.str();
|
||||||
EXPECT_EQ(str.data()[0], static_cast<char>(0xd6));
|
EXPECT_EQ(str.data()[0], static_cast<char>(0xd6u));
|
||||||
|
|
||||||
msgpack::object_handle oh;
|
msgpack::object_handle oh;
|
||||||
msgpack::unpack(oh, str.data(), str.size());
|
msgpack::unpack(oh, str.data(), str.size());
|
||||||
@ -1108,7 +1112,7 @@ TEST(MSGPACK_TIMESPEC, timespec_pack_convert_max_nano)
|
|||||||
|
|
||||||
msgpack::pack(ss, val1);
|
msgpack::pack(ss, val1);
|
||||||
std::string const& str = ss.str();
|
std::string const& str = ss.str();
|
||||||
EXPECT_EQ(str.data()[0], static_cast<char>(0xd7));
|
EXPECT_EQ(str.data()[0], static_cast<char>(0xd7u));
|
||||||
msgpack::object_handle oh;
|
msgpack::object_handle oh;
|
||||||
msgpack::unpack(oh, str.data(), str.size());
|
msgpack::unpack(oh, str.data(), str.size());
|
||||||
timespec val2 = oh.get().as<timespec>();
|
timespec val2 = oh.get().as<timespec>();
|
||||||
@ -1134,7 +1138,7 @@ TEST(MSGPACK_TIMESPEC, timespec_pack_convert_34bit_sec_max_nano)
|
|||||||
|
|
||||||
msgpack::pack(ss, val1);
|
msgpack::pack(ss, val1);
|
||||||
std::string const& str = ss.str();
|
std::string const& str = ss.str();
|
||||||
EXPECT_EQ(str.data()[0], static_cast<char>(0xd7));
|
EXPECT_EQ(str.data()[0], static_cast<char>(0xd7u));
|
||||||
|
|
||||||
msgpack::object_handle oh;
|
msgpack::object_handle oh;
|
||||||
msgpack::unpack(oh, str.data(), str.size());
|
msgpack::unpack(oh, str.data(), str.size());
|
||||||
@ -1162,7 +1166,7 @@ TEST(MSGPACK_TIMESPEC, timespec_pack_convert_35bit_sec_max_nano)
|
|||||||
|
|
||||||
msgpack::pack(ss, val1);
|
msgpack::pack(ss, val1);
|
||||||
std::string const& str = ss.str();
|
std::string const& str = ss.str();
|
||||||
EXPECT_EQ(str.data()[0], static_cast<char>(0xc7));
|
EXPECT_EQ(str.data()[0], static_cast<char>(0xc7u));
|
||||||
|
|
||||||
msgpack::object_handle oh;
|
msgpack::object_handle oh;
|
||||||
msgpack::unpack(oh, str.data(), str.size());
|
msgpack::unpack(oh, str.data(), str.size());
|
||||||
@ -1189,7 +1193,7 @@ TEST(MSGPACK_TIMESPEC, timespec_pack_convert_64bit_sec_max_nano)
|
|||||||
|
|
||||||
msgpack::pack(ss, val1);
|
msgpack::pack(ss, val1);
|
||||||
std::string const& str = ss.str();
|
std::string const& str = ss.str();
|
||||||
EXPECT_EQ(str.data()[0], static_cast<char>(0xc7));
|
EXPECT_EQ(str.data()[0], static_cast<char>(0xc7u));
|
||||||
|
|
||||||
msgpack::object_handle oh;
|
msgpack::object_handle oh;
|
||||||
msgpack::unpack(oh, str.data(), str.size());
|
msgpack::unpack(oh, str.data(), str.size());
|
||||||
|
@ -1,11 +1,15 @@
|
|||||||
#include <msgpack.hpp>
|
#include <msgpack.hpp>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wconversion"
|
#pragma GCC diagnostic ignored "-Wconversion"
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
@ -9,12 +9,16 @@
|
|||||||
#include <list>
|
#include <list>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wconversion"
|
#pragma GCC diagnostic ignored "-Wconversion"
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
@ -1,12 +1,15 @@
|
|||||||
#include <msgpack.hpp>
|
#include <msgpack.hpp>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wconversion"
|
#pragma GCC diagnostic ignored "-Wconversion"
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
TEST(msgpack_tuple, member_get)
|
TEST(msgpack_tuple, member_get)
|
||||||
{
|
{
|
||||||
|
@ -9,12 +9,16 @@
|
|||||||
#include <list>
|
#include <list>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wconversion"
|
#pragma GCC diagnostic ignored "-Wconversion"
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
@ -4,12 +4,16 @@
|
|||||||
#include <limits>
|
#include <limits>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wconversion"
|
#pragma GCC diagnostic ignored "-Wconversion"
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
// To avoid link error
|
// To avoid link error
|
||||||
TEST(MSGPACK_X3_PARSE, dummy)
|
TEST(MSGPACK_X3_PARSE, dummy)
|
||||||
|
@ -1,12 +1,15 @@
|
|||||||
#include <msgpack.hpp>
|
#include <msgpack.hpp>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wconversion"
|
#pragma GCC diagnostic ignored "-Wconversion"
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
enum enum_test {
|
enum enum_test {
|
||||||
elem
|
elem
|
||||||
|
@ -1,11 +1,15 @@
|
|||||||
#include <msgpack.hpp>
|
#include <msgpack.hpp>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wconversion"
|
#pragma GCC diagnostic ignored "-Wconversion"
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
|
@ -1,11 +1,15 @@
|
|||||||
#include <msgpack.hpp>
|
#include <msgpack.hpp>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wconversion"
|
#pragma GCC diagnostic ignored "-Wconversion"
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
@ -524,7 +528,7 @@ TEST(unpack, int_off_larger_than_length)
|
|||||||
TEST(unpack, empty_array_fix)
|
TEST(unpack, empty_array_fix)
|
||||||
{
|
{
|
||||||
std::string buf;
|
std::string buf;
|
||||||
buf.push_back(static_cast<char>(0x90));
|
buf.push_back(static_cast<char>(0x90u));
|
||||||
std::size_t off = 0;
|
std::size_t off = 0;
|
||||||
|
|
||||||
msgpack::object_handle oh = msgpack::unpack(buf.data(), buf.size(), off);
|
msgpack::object_handle oh = msgpack::unpack(buf.data(), buf.size(), off);
|
||||||
@ -536,7 +540,7 @@ TEST(unpack, empty_array_fix)
|
|||||||
TEST(unpack, empty_array_16)
|
TEST(unpack, empty_array_16)
|
||||||
{
|
{
|
||||||
std::string buf;
|
std::string buf;
|
||||||
buf.push_back(static_cast<char>(0xdc));
|
buf.push_back(static_cast<char>(0xdcu));
|
||||||
buf.push_back(static_cast<char>(0x00));
|
buf.push_back(static_cast<char>(0x00));
|
||||||
buf.push_back(static_cast<char>(0x00));
|
buf.push_back(static_cast<char>(0x00));
|
||||||
std::size_t off = 0;
|
std::size_t off = 0;
|
||||||
@ -550,7 +554,7 @@ TEST(unpack, empty_array_16)
|
|||||||
TEST(unpack, empty_array_32)
|
TEST(unpack, empty_array_32)
|
||||||
{
|
{
|
||||||
std::string buf;
|
std::string buf;
|
||||||
buf.push_back(static_cast<char>(0xdd));
|
buf.push_back(static_cast<char>(0xddu));
|
||||||
buf.push_back(static_cast<char>(0x00));
|
buf.push_back(static_cast<char>(0x00));
|
||||||
buf.push_back(static_cast<char>(0x00));
|
buf.push_back(static_cast<char>(0x00));
|
||||||
buf.push_back(static_cast<char>(0x00));
|
buf.push_back(static_cast<char>(0x00));
|
||||||
@ -566,7 +570,7 @@ TEST(unpack, empty_array_32)
|
|||||||
TEST(unpack, empty_map_fix)
|
TEST(unpack, empty_map_fix)
|
||||||
{
|
{
|
||||||
std::string buf;
|
std::string buf;
|
||||||
buf.push_back(static_cast<char>(0x80));
|
buf.push_back(static_cast<char>(0x80u));
|
||||||
std::size_t off = 0;
|
std::size_t off = 0;
|
||||||
|
|
||||||
msgpack::object_handle oh = msgpack::unpack(buf.data(), buf.size(), off);
|
msgpack::object_handle oh = msgpack::unpack(buf.data(), buf.size(), off);
|
||||||
@ -578,7 +582,7 @@ TEST(unpack, empty_map_fix)
|
|||||||
TEST(unpack, empty_map_16)
|
TEST(unpack, empty_map_16)
|
||||||
{
|
{
|
||||||
std::string buf;
|
std::string buf;
|
||||||
buf.push_back(static_cast<char>(0xde));
|
buf.push_back(static_cast<char>(0xdeu));
|
||||||
buf.push_back(static_cast<char>(0x00));
|
buf.push_back(static_cast<char>(0x00));
|
||||||
buf.push_back(static_cast<char>(0x00));
|
buf.push_back(static_cast<char>(0x00));
|
||||||
std::size_t off = 0;
|
std::size_t off = 0;
|
||||||
@ -592,7 +596,7 @@ TEST(unpack, empty_map_16)
|
|||||||
TEST(unpack, empty_map_32)
|
TEST(unpack, empty_map_32)
|
||||||
{
|
{
|
||||||
std::string buf;
|
std::string buf;
|
||||||
buf.push_back(static_cast<char>(0xdf));
|
buf.push_back(static_cast<char>(0xdfu));
|
||||||
buf.push_back(static_cast<char>(0x00));
|
buf.push_back(static_cast<char>(0x00));
|
||||||
buf.push_back(static_cast<char>(0x00));
|
buf.push_back(static_cast<char>(0x00));
|
||||||
buf.push_back(static_cast<char>(0x00));
|
buf.push_back(static_cast<char>(0x00));
|
||||||
|
@ -1,11 +1,15 @@
|
|||||||
#include <msgpack.h>
|
#include <msgpack.h>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wconversion"
|
#pragma GCC diagnostic ignored "-Wconversion"
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
@ -3,12 +3,16 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wconversion"
|
#pragma GCC diagnostic ignored "-Wconversion"
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
@ -1,11 +1,15 @@
|
|||||||
#include <msgpack.hpp>
|
#include <msgpack.hpp>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wconversion"
|
#pragma GCC diagnostic ignored "-Wconversion"
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
TEST(reference, unpack_int)
|
TEST(reference, unpack_int)
|
||||||
{
|
{
|
||||||
|
@ -1,11 +1,15 @@
|
|||||||
#include <msgpack.hpp>
|
#include <msgpack.hpp>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wconversion"
|
#pragma GCC diagnostic ignored "-Wconversion"
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#if !defined(MSGPACK_USE_CPP03)
|
#if !defined(MSGPACK_USE_CPP03)
|
||||||
|
|
||||||
|
@ -1,12 +1,16 @@
|
|||||||
#include <msgpack.hpp>
|
#include <msgpack.hpp>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wconversion"
|
#pragma GCC diagnostic ignored "-Wconversion"
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
@ -2,12 +2,16 @@
|
|||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wconversion"
|
#pragma GCC diagnostic ignored "-Wconversion"
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
@ -1,12 +1,16 @@
|
|||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <msgpack.hpp>
|
#include <msgpack.hpp>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wconversion"
|
#pragma GCC diagnostic ignored "-Wconversion"
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
TEST(size_equal_only, array)
|
TEST(size_equal_only, array)
|
||||||
{
|
{
|
||||||
|
@ -1,11 +1,15 @@
|
|||||||
#include <msgpack.hpp>
|
#include <msgpack.hpp>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wconversion"
|
#pragma GCC diagnostic ignored "-Wconversion"
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
|
@ -1,11 +1,15 @@
|
|||||||
#include <msgpack.h>
|
#include <msgpack.h>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wconversion"
|
#pragma GCC diagnostic ignored "-Wconversion"
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
@ -2,12 +2,16 @@
|
|||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wconversion"
|
#pragma GCC diagnostic ignored "-Wconversion"
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
@ -2,12 +2,16 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wconversion"
|
#pragma GCC diagnostic ignored "-Wconversion"
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
@ -1,11 +1,15 @@
|
|||||||
#include <msgpack.hpp>
|
#include <msgpack.hpp>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wconversion"
|
#pragma GCC diagnostic ignored "-Wconversion"
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
TEST(version, print)
|
TEST(version, print)
|
||||||
{
|
{
|
||||||
|
@ -1,11 +1,15 @@
|
|||||||
#include <msgpack.hpp>
|
#include <msgpack.hpp>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wconversion"
|
#pragma GCC diagnostic ignored "-Wconversion"
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
|
@ -1,11 +1,15 @@
|
|||||||
#include <msgpack.hpp>
|
#include <msgpack.hpp>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wconversion"
|
#pragma GCC diagnostic ignored "-Wconversion"
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
TEST(zone, allocate_align)
|
TEST(zone, allocate_align)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user