11 #include "gtest/gtest.h"
20 auto encoded = codec.EncodeMessage(
value);
22 auto decoded = codec.DecodeMessage(*encoded);
23 EXPECT_EQ(
value, *decoded);
31 rapidjson::Document array(rapidjson::kArrayType);
32 auto& allocator = array.GetAllocator();
34 array.PushBack(
"string", allocator);
36 rapidjson::Value map(rapidjson::kObjectType);
37 map.AddMember(
"a", -7, allocator);
38 map.AddMember(
"b", std::numeric_limits<int>::max(), allocator);
39 map.AddMember(
"c", 3.14159, allocator);
40 map.AddMember(
"d",
true, allocator);
41 map.AddMember(
"e", rapidjson::Value(), allocator);
42 array.PushBack(map, allocator);