Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
fl_standard_method_codec_test.cc
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "flutter/shell/platform/linux/public/flutter_linux/fl_standard_method_codec.h"
6#include "flutter/shell/platform/linux/fl_method_codec_private.h"
7#include "flutter/shell/platform/linux/public/flutter_linux/fl_message_codec.h"
8#include "flutter/shell/platform/linux/public/flutter_linux/fl_standard_message_codec.h"
9#include "flutter/shell/platform/linux/testing/fl_test.h"
10#include "gtest/gtest.h"
11
12G_DECLARE_FINAL_TYPE(FlTestMethodMessageCodec,
13 fl_test_method_message_codec,
14 FL,
15 TEST_METHOD_MESSAGE_CODEC,
16 FlStandardMessageCodec)
17
18struct _FlTestMethodMessageCodec {
19 FlStandardMessageCodec parent_instance;
20};
21
22G_DEFINE_TYPE(FlTestMethodMessageCodec,
23 fl_test_method_message_codec,
24 fl_standard_message_codec_get_type())
25
26static gboolean write_custom_value(FlStandardMessageCodec* codec,
27 GByteArray* buffer,
29 GError** error) {
30 const gchar* text =
31 static_cast<const gchar*>(fl_value_get_custom_value(value));
32 size_t length = strlen(text);
33
34 uint8_t type = 128;
35 g_byte_array_append(buffer, &type, sizeof(uint8_t));
37 g_byte_array_append(buffer, reinterpret_cast<const uint8_t*>(text), length);
38 return TRUE;
39}
40
42 FlStandardMessageCodec* codec,
43 GByteArray* buffer,
45 GError** error) {
48 return write_custom_value(codec, buffer, value, error);
49 } else {
50 return FL_STANDARD_MESSAGE_CODEC_CLASS(
51 fl_test_method_message_codec_parent_class)
52 ->write_value(codec, buffer, value, error);
53 }
54}
55
56static FlValue* read_custom_value(FlStandardMessageCodec* codec,
57 GBytes* buffer,
58 size_t* offset,
59 GError** error) {
60 uint32_t length;
62 error)) {
63 return nullptr;
64 }
65 if (*offset + length > g_bytes_get_size(buffer)) {
66 g_set_error(error, FL_MESSAGE_CODEC_ERROR,
67 FL_MESSAGE_CODEC_ERROR_OUT_OF_DATA, "Unexpected end of data");
68 return nullptr;
69 }
71 128,
72 g_strndup(static_cast<const gchar*>(g_bytes_get_data(buffer, nullptr)) +
73 *offset,
74 length),
75 g_free);
76 *offset += length;
77
78 return value;
79}
80
82 FlStandardMessageCodec* codec,
83 GBytes* buffer,
84 size_t* offset,
85 int type,
86 GError** error) {
87 if (type == 128) {
88 return read_custom_value(codec, buffer, offset, error);
89 } else {
90 return FL_STANDARD_MESSAGE_CODEC_CLASS(
91 fl_test_method_message_codec_parent_class)
92 ->read_value_of_type(codec, buffer, offset, type, error);
93 }
94}
95
97 FlTestMethodMessageCodecClass* klass) {
98 FL_STANDARD_MESSAGE_CODEC_CLASS(klass)->write_value =
100 FL_STANDARD_MESSAGE_CODEC_CLASS(klass)->read_value_of_type =
102}
103
104static void fl_test_method_message_codec_init(FlTestMethodMessageCodec* self) {
105 // The following line suppresses a warning for unused function
106 FL_IS_TEST_METHOD_MESSAGE_CODEC(self);
107}
108
109static FlTestMethodMessageCodec* fl_test_method_message_codec_new() {
110 return FL_TEST_METHOD_MESSAGE_CODEC(
111 g_object_new(fl_test_method_message_codec_get_type(), nullptr));
112}
113
114// NOTE(robert-ancell) These test cases assumes a little-endian architecture.
115// These tests will need to be updated if tested on a big endian architecture.
116
117// Encodes a method call using StandardMethodCodec to a hex string.
118static gchar* encode_method_call(const gchar* name, FlValue* args) {
119 g_autoptr(FlStandardMethodCodec) codec = fl_standard_method_codec_new();
120 g_autoptr(GError) error = nullptr;
122 FL_METHOD_CODEC(codec), name, args, &error);
123 EXPECT_NE(message, nullptr);
124 EXPECT_EQ(error, nullptr);
125
127}
128
129// Encodes a success envelope response using StandardMethodCodec to a hex
130// string.
132 g_autoptr(FlStandardMethodCodec) codec = fl_standard_method_codec_new();
133 g_autoptr(GError) error = nullptr;
135 FL_METHOD_CODEC(codec), result, &error);
136 EXPECT_NE(message, nullptr);
137 EXPECT_EQ(error, nullptr);
138
140}
141
142// Encodes a error envelope response using StandardMethodCodec to a hex string.
143static gchar* encode_error_envelope(const gchar* error_code,
144 const gchar* error_message,
145 FlValue* details) {
146 g_autoptr(FlStandardMethodCodec) codec = fl_standard_method_codec_new();
147 g_autoptr(GError) error = nullptr;
149 FL_METHOD_CODEC(codec), error_code, error_message, details, &error);
150 EXPECT_NE(message, nullptr);
151 EXPECT_EQ(error, nullptr);
152
154}
155
156// Decodes a method call using StandardMethodCodec with a hex string.
157static void decode_method_call(const char* hex_string,
158 gchar** name,
159 FlValue** args) {
160 g_autoptr(FlStandardMethodCodec) codec = fl_standard_method_codec_new();
161 g_autoptr(GBytes) message = hex_string_to_bytes(hex_string);
162 g_autoptr(GError) error = nullptr;
164 FL_METHOD_CODEC(codec), message, name, args, &error);
166 EXPECT_EQ(error, nullptr);
167}
168
169// Decodes a method call using StandardMethodCodec. Expect the given error.
170static void decode_error_method_call(const char* hex_string,
171 GQuark domain,
172 gint code) {
173 g_autoptr(FlStandardMethodCodec) codec = fl_standard_method_codec_new();
174 g_autoptr(GBytes) message = hex_string_to_bytes(hex_string);
175 g_autoptr(GError) error = nullptr;
176 g_autofree gchar* name = nullptr;
177 g_autoptr(FlValue) args = nullptr;
179 FL_METHOD_CODEC(codec), message, &name, &args, &error);
180 EXPECT_FALSE(result);
181 EXPECT_EQ(name, nullptr);
182 EXPECT_EQ(args, nullptr);
183 EXPECT_TRUE(g_error_matches(error, domain, code));
184}
185
186// Decodes a response using StandardMethodCodec. Expect the response is a
187// result.
188static void decode_response_with_success(const char* hex_string,
189 FlValue* result) {
190 g_autoptr(FlStandardMethodCodec) codec = fl_standard_method_codec_new();
191 g_autoptr(GBytes) message = hex_string_to_bytes(hex_string);
192 g_autoptr(GError) error = nullptr;
193 g_autoptr(FlMethodResponse) response =
194 fl_method_codec_decode_response(FL_METHOD_CODEC(codec), message, &error);
195 ASSERT_NE(response, nullptr);
196 EXPECT_EQ(error, nullptr);
197 EXPECT_TRUE(FL_IS_METHOD_SUCCESS_RESPONSE(response));
199 FL_METHOD_SUCCESS_RESPONSE(response)),
200 result));
201}
202
203// Decodes a response using StandardMethodCodec. Expect the response contains
204// the given error.
205static void decode_response_with_error(const char* hex_string,
206 const gchar* code,
207 const gchar* error_message,
208 FlValue* details) {
209 g_autoptr(FlStandardMethodCodec) codec = fl_standard_method_codec_new();
210 g_autoptr(GBytes) message = hex_string_to_bytes(hex_string);
211 g_autoptr(GError) error = nullptr;
212 g_autoptr(FlMethodResponse) response =
213 fl_method_codec_decode_response(FL_METHOD_CODEC(codec), message, &error);
214 ASSERT_NE(response, nullptr);
215 EXPECT_EQ(error, nullptr);
216 EXPECT_TRUE(FL_IS_METHOD_ERROR_RESPONSE(response));
217 EXPECT_STREQ(
218 fl_method_error_response_get_code(FL_METHOD_ERROR_RESPONSE(response)),
219 code);
220 if (error_message == nullptr) {
222 FL_METHOD_ERROR_RESPONSE(response)),
223 nullptr);
224 } else {
226 FL_METHOD_ERROR_RESPONSE(response)),
227 error_message);
228 }
229 if (details == nullptr) {
231 FL_METHOD_ERROR_RESPONSE(response)),
232 nullptr);
233 } else {
235 FL_METHOD_ERROR_RESPONSE(response)),
236 details));
237 }
238}
239
240static void decode_error_response(const char* hex_string,
241 GQuark domain,
242 gint code) {
243 g_autoptr(FlStandardMethodCodec) codec = fl_standard_method_codec_new();
244 g_autoptr(GBytes) message = hex_string_to_bytes(hex_string);
245 g_autoptr(GError) error = nullptr;
246 g_autoptr(FlMethodResponse) response =
247 fl_method_codec_decode_response(FL_METHOD_CODEC(codec), message, &error);
248 EXPECT_EQ(response, nullptr);
249 EXPECT_TRUE(g_error_matches(error, domain, code));
250}
251
252TEST(FlStandardMethodCodecTest, EncodeMethodCallNullptrArgs) {
253 g_autofree gchar* hex_string = encode_method_call("hello", nullptr);
254 EXPECT_STREQ(hex_string, "070568656c6c6f00");
255}
256
257TEST(FlStandardMethodCodecTest, EncodeMethodCallNullArgs) {
258 g_autoptr(FlValue) value = fl_value_new_null();
259 g_autofree gchar* hex_string = encode_method_call("hello", value);
260 EXPECT_STREQ(hex_string, "070568656c6c6f00");
261}
262
263TEST(FlStandardMethodCodecTest, EncodeMethodCallStringArgs) {
264 g_autoptr(FlValue) args = fl_value_new_string("world");
265 g_autofree gchar* hex_string = encode_method_call("hello", args);
266 EXPECT_STREQ(hex_string, "070568656c6c6f0705776f726c64");
267}
268
269TEST(FlStandardMethodCodecTest, EncodeMethodCallListArgs) {
270 g_autoptr(FlValue) args = fl_value_new_list();
273 g_autofree gchar* hex_string = encode_method_call("hello", args);
274 EXPECT_STREQ(hex_string, "070568656c6c6f0c020705636f756e74032a000000");
275}
276
277TEST(FlStandardMethodCodecTest, DecodeMethodCallNullArgs) {
278 g_autofree gchar* name = nullptr;
279 g_autoptr(FlValue) args = nullptr;
280 decode_method_call("070568656c6c6f00", &name, &args);
281 EXPECT_STREQ(name, "hello");
283}
284
285TEST(FlStandardMethodCodecTest, DecodeMethodCallStringArgs) {
286 g_autofree gchar* name = nullptr;
287 g_autoptr(FlValue) args = nullptr;
288 decode_method_call("070568656c6c6f0705776f726c64", &name, &args);
289 EXPECT_STREQ(name, "hello");
291 EXPECT_STREQ(fl_value_get_string(args), "world");
292}
293
294TEST(FlStandardMethodCodecTest, DecodeMethodCallListArgs) {
295 g_autofree gchar* name = nullptr;
296 g_autoptr(FlValue) args = nullptr;
297 decode_method_call("070568656c6c6f0c020705636f756e74032a000000", &name,
298 &args);
299 EXPECT_STREQ(name, "hello");
301 EXPECT_EQ(fl_value_get_length(args), static_cast<size_t>(2));
302
304 ASSERT_EQ(fl_value_get_type(arg0), FL_VALUE_TYPE_STRING);
305 EXPECT_STREQ(fl_value_get_string(arg0), "count");
306
308 ASSERT_EQ(fl_value_get_type(arg1), FL_VALUE_TYPE_INT);
309 EXPECT_EQ(fl_value_get_int(arg1), 42);
310}
311
312TEST(FlStandardMethodCodecTest, DecodeMethodCallNoData) {
315}
316
317TEST(FlStandardMethodCodecTest, DecodeMethodCallNullMethodName) {
320}
321
322TEST(FlStandardMethodCodecTest, DecodeMethodCallMissingArgs) {
325}
326
327TEST(FlStandardMethodCodecTest, EncodeSuccessEnvelopeNullptr) {
328 g_autofree gchar* hex_string = encode_success_envelope(nullptr);
329 EXPECT_STREQ(hex_string, "0000");
330}
331
332TEST(FlStandardMethodCodecTest, EncodeSuccessEnvelopeNull) {
333 g_autoptr(FlValue) result = fl_value_new_null();
334 g_autofree gchar* hex_string = encode_success_envelope(result);
335 EXPECT_STREQ(hex_string, "0000");
336}
337
338TEST(FlStandardMethodCodecTest, EncodeSuccessEnvelopeString) {
339 g_autoptr(FlValue) result = fl_value_new_string("hello");
340 g_autofree gchar* hex_string = encode_success_envelope(result);
341 EXPECT_STREQ(hex_string, "00070568656c6c6f");
342}
343
344TEST(FlStandardMethodCodecTest, EncodeSuccessEnvelopeList) {
345 g_autoptr(FlValue) result = fl_value_new_list();
348 g_autofree gchar* hex_string = encode_success_envelope(result);
349 EXPECT_STREQ(hex_string, "000c020705636f756e74032a000000");
350}
351
352TEST(FlStandardMethodCodecTest, EncodeErrorEnvelopeEmptyCode) {
353 g_autofree gchar* hex_string = encode_error_envelope("", nullptr, nullptr);
354 EXPECT_STREQ(hex_string, "0107000000");
355}
356
357TEST(FlStandardMethodCodecTest, EncodeErrorEnvelopeNonMessageOrDetails) {
358 g_autofree gchar* hex_string =
359 encode_error_envelope("error", nullptr, nullptr);
360 EXPECT_STREQ(hex_string, "0107056572726f720000");
361}
362
363TEST(FlStandardMethodCodecTest, EncodeErrorEnvelopeMessage) {
364 g_autofree gchar* hex_string =
365 encode_error_envelope("error", "message", nullptr);
366 EXPECT_STREQ(hex_string, "0107056572726f7207076d65737361676500");
367}
368
369TEST(FlStandardMethodCodecTest, EncodeErrorEnvelopeDetails) {
370 g_autoptr(FlValue) details = fl_value_new_list();
371 fl_value_append_take(details, fl_value_new_string("count"));
373 g_autofree gchar* hex_string =
374 encode_error_envelope("error", nullptr, details);
375 EXPECT_STREQ(hex_string, "0107056572726f72000c020705636f756e74032a000000");
376}
377
378TEST(FlStandardMethodCodecTest, EncodeErrorEnvelopeMessageAndDetails) {
379 g_autoptr(FlValue) details = fl_value_new_list();
380 fl_value_append_take(details, fl_value_new_string("count"));
382 g_autofree gchar* hex_string =
383 encode_error_envelope("error", "message", details);
384 EXPECT_STREQ(
385 hex_string,
386 "0107056572726f7207076d6573736167650c020705636f756e74032a000000");
387}
388
389TEST(FlStandardMethodCodecTest, DecodeResponseSuccessNull) {
390 g_autoptr(FlValue) result = fl_value_new_null();
392}
393
394TEST(FlStandardMethodCodecTest, DecodeResponseSuccessString) {
395 g_autoptr(FlValue) result = fl_value_new_string("hello");
396 decode_response_with_success("00070568656c6c6f", result);
397}
398
399TEST(FlStandardMethodCodecTest, DecodeResponseSuccessList) {
400 g_autoptr(FlValue) result = fl_value_new_list();
403 decode_response_with_success("000c020705636f756e74032a000000", result);
404}
405
406TEST(FlStandardMethodCodecTest, DecodeResponseErrorEmptyCode) {
407 decode_response_with_error("0107000000", "", nullptr, nullptr);
408}
409
410TEST(FlStandardMethodCodecTest, DecodeResponseErrorNoMessageOrDetails) {
411 decode_response_with_error("0107056572726f720000", "error", nullptr, nullptr);
412}
413
414TEST(FlStandardMethodCodecTest, DecodeResponseErrorMessage) {
415 decode_response_with_error("0107056572726f7207076d65737361676500", "error",
416 "message", nullptr);
417}
418
419TEST(FlStandardMethodCodecTest, DecodeResponseErrorDetails) {
420 g_autoptr(FlValue) details = fl_value_new_list();
421 fl_value_append_take(details, fl_value_new_string("count"));
423 decode_response_with_error("0107056572726f72000c020705636f756e74032a000000",
424 "error", nullptr, details);
425}
426
427TEST(FlStandardMethodCodecTest, DecodeResponseErrorMessageAndDetails) {
428 g_autoptr(FlValue) details = fl_value_new_list();
429 fl_value_append_take(details, fl_value_new_string("count"));
432 "0107056572726f7207076d6573736167650c020705636f756e74032a000000", "error",
433 "message", details);
434}
435
436TEST(FlStandardMethodCodecTest, DecodeResponseSuccessNoData) {
439}
440
441TEST(FlStandardMethodCodecTest, DecodeResponseSuccessExtraData) {
444}
445
446TEST(FlStandardMethodCodecTest, DecodeResponseErrorNoData) {
449}
450
451TEST(FlStandardMethodCodecTest, DecodeResponseErrorMissingMessageAndDetails) {
454}
455
456TEST(FlStandardMethodCodecTest, DecodeResponseErrorMissingDetails) {
457 decode_error_response("0107056572726f7200", FL_MESSAGE_CODEC_ERROR,
459}
460
461TEST(FlStandardMethodCodecTest, DecodeResponseErrorExtraData) {
462 decode_error_response("0107056572726f72000000", FL_MESSAGE_CODEC_ERROR,
464}
465
466TEST(FlStandardMethodCodecTest, DecodeResponseNotImplemented) {
467 g_autoptr(FlStandardMethodCodec) codec = fl_standard_method_codec_new();
468 g_autoptr(GBytes) message = g_bytes_new(nullptr, 0);
469 g_autoptr(GError) error = nullptr;
470 g_autoptr(FlMethodResponse) response =
471 fl_method_codec_decode_response(FL_METHOD_CODEC(codec), message, &error);
472 ASSERT_NE(response, nullptr);
473 EXPECT_EQ(error, nullptr);
474 EXPECT_TRUE(FL_IS_METHOD_NOT_IMPLEMENTED_RESPONSE(response));
475}
476
477TEST(FlStandardMethodCodecTest, DecodeResponseUnknownEnvelope) {
480}
481
482TEST(FlStandardMethodCodecTest, CustomMessageCodec) {
483 g_autoptr(FlTestMethodMessageCodec) message_codec =
485 g_autoptr(FlStandardMethodCodec) codec =
487 FL_STANDARD_MESSAGE_CODEC(message_codec));
488
489 g_autoptr(GError) error = nullptr;
490 g_autoptr(FlValue) value = fl_value_new_custom(128, "hello", nullptr);
492 FL_METHOD_CODEC(codec), value, &error);
493 EXPECT_NE(message, nullptr);
494 EXPECT_EQ(error, nullptr);
495 g_autofree gchar* hex_string = bytes_to_hex_string(message);
496 EXPECT_STREQ(hex_string, "00800568656c6c6f");
497
498 g_autoptr(FlMethodResponse) response =
499 fl_method_codec_decode_response(FL_METHOD_CODEC(codec), message, &error);
500 EXPECT_NE(response, nullptr);
501 EXPECT_EQ(error, nullptr);
502 EXPECT_TRUE(FL_IS_METHOD_SUCCESS_RESPONSE(response));
504 FL_METHOD_SUCCESS_RESPONSE(response));
506 ASSERT_EQ(fl_value_get_custom_type(result), 128);
507 EXPECT_STREQ(static_cast<const gchar*>(fl_value_get_custom_value(result)),
508 "hello");
509}
#define TEST(S, s, D, expected)
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
@ FL_MESSAGE_CODEC_ERROR_OUT_OF_DATA
@ FL_MESSAGE_CODEC_ERROR_FAILED
#define FL_MESSAGE_CODEC_ERROR
FlMethodResponse * fl_method_codec_decode_response(FlMethodCodec *self, GBytes *message, GError **error)
gboolean fl_method_codec_decode_method_call(FlMethodCodec *self, GBytes *message, gchar **name, FlValue **args, GError **error)
GBytes * fl_method_codec_encode_success_envelope(FlMethodCodec *self, FlValue *result, GError **error)
GBytes * fl_method_codec_encode_method_call(FlMethodCodec *self, const gchar *name, FlValue *args, GError **error)
GBytes * fl_method_codec_encode_error_envelope(FlMethodCodec *self, const gchar *code, const gchar *message, FlValue *details, GError **error)
G_MODULE_EXPORT FlValue * fl_method_success_response_get_result(FlMethodSuccessResponse *self)
G_MODULE_EXPORT const gchar * fl_method_error_response_get_message(FlMethodErrorResponse *self)
G_MODULE_EXPORT FlValue * fl_method_error_response_get_details(FlMethodErrorResponse *self)
G_MODULE_EXPORT const gchar * fl_method_error_response_get_code(FlMethodErrorResponse *self)
G_MODULE_EXPORT gboolean fl_standard_message_codec_read_size(FlStandardMessageCodec *codec, GBytes *buffer, size_t *offset, uint32_t *value, GError **error)
G_MODULE_EXPORT FlStandardMethodCodec * fl_standard_method_codec_new_with_message_codec(FlStandardMessageCodec *message_codec)
G_MODULE_EXPORT FlStandardMethodCodec * fl_standard_method_codec_new()
static void decode_method_call(const char *hex_string, gchar **name, FlValue **args)
G_DECLARE_FINAL_TYPE(FlTestMethodMessageCodec, fl_test_method_message_codec, FL, TEST_METHOD_MESSAGE_CODEC, FlStandardMessageCodec) struct _FlTestMethodMessageCodec
static void decode_error_method_call(const char *hex_string, GQuark domain, gint code)
fl_standard_message_codec_write_size(codec, buffer, length)
static FlValue * read_custom_value(FlStandardMessageCodec *codec, GBytes *buffer, size_t *offset, GError **error)
static void decode_response_with_error(const char *hex_string, const gchar *code, const gchar *error_message, FlValue *details)
static void fl_test_method_message_codec_init(FlTestMethodMessageCodec *self)
static FlTestMethodMessageCodec * fl_test_method_message_codec_new()
GByteArray * buffer
static gchar * encode_method_call(const gchar *name, FlValue *args)
GByteArray FlValue GError ** error
static gchar * encode_error_envelope(const gchar *error_code, const gchar *error_message, FlValue *details)
GByteArray FlValue * value
G_DEFINE_TYPE(FlTestMethodMessageCodec, fl_test_method_message_codec, fl_standard_message_codec_get_type()) static gboolean write_custom_value(FlStandardMessageCodec *codec
static void decode_response_with_success(const char *hex_string, FlValue *result)
g_byte_array_append(buffer, &type, sizeof(uint8_t))
static void decode_error_response(const char *hex_string, GQuark domain, gint code)
static gchar * encode_success_envelope(FlValue *result)
static FlValue * fl_test_method_message_codec_read_value_of_type(FlStandardMessageCodec *codec, GBytes *buffer, size_t *offset, int type, GError **error)
static gboolean fl_test_method_message_codec_write_value(FlStandardMessageCodec *codec, GByteArray *buffer, FlValue *value, GError **error)
static void fl_test_method_message_codec_class_init(FlTestMethodMessageCodecClass *klass)
GBytes * hex_string_to_bytes(const gchar *hex_string)
Definition fl_test.cc:43
gchar * bytes_to_hex_string(GBytes *bytes)
Definition fl_test.cc:52
GAsyncResult * result
G_MODULE_EXPORT int64_t fl_value_get_int(FlValue *self)
Definition fl_value.cc:668
G_MODULE_EXPORT FlValue * fl_value_new_custom(int type, gconstpointer value, GDestroyNotify destroy_notify)
Definition fl_value.cc:374
G_MODULE_EXPORT FlValueType fl_value_get_type(FlValue *self)
Definition fl_value.cc:466
G_MODULE_EXPORT FlValue * fl_value_new_null()
Definition fl_value.cc:251
G_MODULE_EXPORT FlValue * fl_value_new_string(const gchar *value)
Definition fl_value.cc:276
G_MODULE_EXPORT const gchar * fl_value_get_string(FlValue *self)
Definition fl_value.cc:682
G_MODULE_EXPORT int fl_value_get_custom_type(FlValue *self)
Definition fl_value.cc:822
G_MODULE_EXPORT FlValue * fl_value_new_int(int64_t value)
Definition fl_value.cc:262
G_MODULE_EXPORT void fl_value_append_take(FlValue *self, FlValue *value)
Definition fl_value.cc:600
G_MODULE_EXPORT gconstpointer fl_value_get_custom_value(FlValue *self)
Definition fl_value.cc:830
G_MODULE_EXPORT FlValue * fl_value_get_list_value(FlValue *self, size_t index)
Definition fl_value.cc:776
G_MODULE_EXPORT FlValue * fl_value_new_list()
Definition fl_value.cc:349
G_MODULE_EXPORT bool fl_value_equal(FlValue *a, FlValue *b)
Definition fl_value.cc:471
G_MODULE_EXPORT size_t fl_value_get_length(FlValue *self)
Definition fl_value.cc:724
typedefG_BEGIN_DECLS struct _FlValue FlValue
Definition fl_value.h:42
@ FL_VALUE_TYPE_STRING
Definition fl_value.h:69
@ FL_VALUE_TYPE_NULL
Definition fl_value.h:65
@ FL_VALUE_TYPE_INT
Definition fl_value.h:67
@ FL_VALUE_TYPE_LIST
Definition fl_value.h:74
@ FL_VALUE_TYPE_CUSTOM
Definition fl_value.h:77
const char * name
Definition fuchsia.cc:50
std::u16string text
Win32Message message
Point offset
#define EXPECT_TRUE(handle)
Definition unit_test.h:685