5#include "flutter/shell/platform/common/json_message_codec.h"
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);
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);
static const JsonMessageCodec & GetInstance()
static float max(float r, float g, float b)
TEST(FrameTimingsRecorderTest, RecordVsync)
static void CheckEncodeDecode(const EncodableValue &value, const std::vector< uint8_t > &expected_encoding, const StandardCodecSerializer *serializer=nullptr, const std::function< bool(const EncodableValue &a, const EncodableValue &b)> &custom_comparator=nullptr)
SI auto map(std::index_sequence< I... >, Fn &&fn, const Args &... args) -> skvx::Vec< sizeof...(I), decltype(fn(args[0]...))>