89 ASSERT_NE(encoded.get(),
nullptr);
90 std::vector<uint8_t> bytes = {0x00, 0x03, 0x2a, 0x00, 0x00, 0x00};
91 EXPECT_EQ(*encoded, bytes);
93 bool decoded_successfully =
false;
96 decoded_successfully =
true;
97 EXPECT_EQ(std::get<int32_t>(*
result), 42);
108 ASSERT_NE(encoded.get(),
nullptr);
109 std::vector<uint8_t> bytes = {0x01, 0x07, 0x09, 0x65, 0x72, 0x72, 0x6f,
110 0x72, 0x43, 0x6f, 0x64, 0x65, 0x00, 0x00};
111 EXPECT_EQ(*encoded, bytes);
113 bool decoded_successfully =
false;
116 [&decoded_successfully](
const std::string& code,
119 decoded_successfully =
true;
120 EXPECT_EQ(code,
"errorCode");
122 EXPECT_EQ(details,
nullptr);
138 ASSERT_NE(encoded.get(),
nullptr);
139 std::vector<uint8_t> bytes = {
140 0x01, 0x07, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f,
141 0x64, 0x65, 0x07, 0x10, 0x73, 0x6f, 0x6d, 0x65, 0x74, 0x68,
142 0x69, 0x6e, 0x67, 0x20, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64,
143 0x0c, 0x02, 0x07, 0x01, 0x61, 0x03, 0x2a, 0x00, 0x00, 0x00,
145 EXPECT_EQ(*encoded, bytes);
147 bool decoded_successfully =
false;
150 [&decoded_successfully](
const std::string& code,
153 decoded_successfully =
true;
154 EXPECT_EQ(code,
"errorCode");
155 EXPECT_EQ(
message,
"something failed");
156 const auto* details_list = std::get_if<EncodableList>(details);
157 ASSERT_NE(details_list,
nullptr);
158 EXPECT_EQ(std::get<std::string>((*details_list)[0]),
"a");
159 EXPECT_EQ(std::get<int32_t>((*details_list)[1]), 42);
static const PointExtensionSerializer & GetInstance()