5#include "flutter/shell/platform/linux/public/flutter_linux/fl_standard_message_codec.h"
6#include "flutter/shell/platform/linux/testing/fl_test.h"
7#include "gtest/gtest.h"
15 g_autoptr(GError)
error =
nullptr;
19 EXPECT_EQ(
error,
nullptr);
34 FlMessageCodec* codec) {
36 g_autoptr(GError)
error =
nullptr;
39 EXPECT_EQ(
error,
nullptr);
40 EXPECT_NE(
value,
nullptr);
58 g_autoptr(GError)
error =
nullptr;
65TEST(FlStandardMessageCodecTest, EncodeNullptr) {
67 EXPECT_STREQ(hex_string,
"00");
70TEST(FlStandardMessageCodecTest, EncodeNull) {
73 EXPECT_STREQ(hex_string,
"00");
76TEST(FlStandardMessageCodecTest, DecodeNull) {
80 g_autoptr(GBytes)
data = g_bytes_new(
nullptr, 0);
81 g_autoptr(GError)
error =
nullptr;
85 EXPECT_FALSE(
value ==
nullptr);
94TEST(FlStandardMessageCodecTest, EncodeBoolFalse) {
96 EXPECT_STREQ(hex_string,
"02");
99TEST(FlStandardMessageCodecTest, EncodeBoolTrue) {
101 EXPECT_STREQ(hex_string,
"01");
109TEST(FlStandardMessageCodecTest, EncodeIntZero) {
111 EXPECT_STREQ(hex_string,
"0300000000");
114TEST(FlStandardMessageCodecTest, EncodeIntOne) {
116 EXPECT_STREQ(hex_string,
"0301000000");
119TEST(FlStandardMessageCodecTest, EncodeInt32) {
120 g_autofree gchar* hex_string =
encode_int(0x01234567);
121 EXPECT_STREQ(hex_string,
"0367452301");
124TEST(FlStandardMessageCodecTest, EncodeInt32Min) {
125 g_autofree gchar* hex_string =
encode_int(G_MININT32);
126 EXPECT_STREQ(hex_string,
"0300000080");
129TEST(FlStandardMessageCodecTest, EncodeInt32Max) {
130 g_autofree gchar* hex_string =
encode_int(G_MAXINT32);
131 EXPECT_STREQ(hex_string,
"03ffffff7f");
134TEST(FlStandardMessageCodecTest, EncodeInt64) {
135 g_autofree gchar* hex_string =
encode_int(0x0123456789abcdef);
136 EXPECT_STREQ(hex_string,
"04efcdab8967452301");
139TEST(FlStandardMessageCodecTest, EncodeInt64Min) {
140 g_autofree gchar* hex_string =
encode_int(G_MININT64);
141 EXPECT_STREQ(hex_string,
"040000000000000080");
144TEST(FlStandardMessageCodecTest, EncodeInt64Max) {
145 g_autofree gchar* hex_string =
encode_int(G_MAXINT64);
146 EXPECT_STREQ(hex_string,
"04ffffffffffffff7f");
149TEST(FlStandardMessageCodecTest, DecodeIntZero) {
155TEST(FlStandardMessageCodecTest, DecodeIntOne) {
161TEST(FlStandardMessageCodecTest, DecodeInt32) {
167TEST(FlStandardMessageCodecTest, DecodeInt32Min) {
173TEST(FlStandardMessageCodecTest, DecodeInt32Max) {
179TEST(FlStandardMessageCodecTest, DecodeInt64) {
185TEST(FlStandardMessageCodecTest, DecodeInt64Min) {
191TEST(FlStandardMessageCodecTest, DecodeInt64Max) {
197TEST(FlStandardMessageCodecTest, DecodeInt32NoData) {
202TEST(FlStandardMessageCodecTest, DecodeIntShortData1) {
207TEST(FlStandardMessageCodecTest, DecodeIntShortData2) {
212TEST(FlStandardMessageCodecTest, DecodeInt64NoData) {
217TEST(FlStandardMessageCodecTest, DecodeInt64ShortData1) {
222TEST(FlStandardMessageCodecTest, DecodeInt64ShortData2) {
232TEST(FlStandardMessageCodecTest, EncodeFloatZero) {
234 EXPECT_STREQ(hex_string,
"06000000000000000000000000000000");
237TEST(FlStandardMessageCodecTest, EncodeFloatOne) {
239 EXPECT_STREQ(hex_string,
"0600000000000000000000000000f03f");
242TEST(FlStandardMessageCodecTest, EncodeFloatMinusOne) {
244 EXPECT_STREQ(hex_string,
"0600000000000000000000000000f0bf");
247TEST(FlStandardMessageCodecTest, EncodeFloatHalf) {
249 EXPECT_STREQ(hex_string,
"0600000000000000000000000000e03f");
252TEST(FlStandardMessageCodecTest, EncodeFloatFraction) {
254 EXPECT_STREQ(hex_string,
"0600000000000000182d4454fb210940");
257TEST(FlStandardMessageCodecTest, EncodeFloatMinusZero) {
259 EXPECT_STREQ(hex_string,
"06000000000000000000000000000080");
262TEST(FlStandardMessageCodecTest, EncodeFloatNaN) {
264 EXPECT_STREQ(hex_string,
"0600000000000000000000000000f87f");
267TEST(FlStandardMessageCodecTest, EncodeFloatInfinity) {
269 EXPECT_STREQ(hex_string,
"0600000000000000000000000000f07f");
272TEST(FlStandardMessageCodecTest, DecodeFloatZero) {
278TEST(FlStandardMessageCodecTest, DecodeFloatOne) {
284TEST(FlStandardMessageCodecTest, DecodeFloatMinusOne) {
290TEST(FlStandardMessageCodecTest, DecodeFloatHalf) {
296TEST(FlStandardMessageCodecTest, DecodeFloatPi) {
302TEST(FlStandardMessageCodecTest, DecodeFloatMinusZero) {
308TEST(FlStandardMessageCodecTest, DecodeFloatNaN) {
314TEST(FlStandardMessageCodecTest, DecodeFloatInfinity) {
320TEST(FlStandardMessageCodecTest, DecodeFloatNoData) {
325TEST(FlStandardMessageCodecTest, DecodeFloatShortData1) {
330TEST(FlStandardMessageCodecTest, DecodeFloatShortData2) {
340TEST(FlStandardMessageCodecTest, EncodeStringEmpty) {
342 EXPECT_STREQ(hex_string,
"0700");
345TEST(FlStandardMessageCodecTest, EncodeStringHello) {
347 EXPECT_STREQ(hex_string,
"070568656c6c6f");
350TEST(FlStandardMessageCodecTest, EncodeStringEmptySized) {
353 EXPECT_STREQ(hex_string,
"0700");
356TEST(FlStandardMessageCodecTest, EncodeStringHelloSized) {
359 EXPECT_STREQ(hex_string,
"070548656c6c6f");
362TEST(FlStandardMessageCodecTest, DecodeStringEmpty) {
368TEST(FlStandardMessageCodecTest, DecodeStringHello) {
374TEST(FlStandardMessageCodecTest, DecodeStringNoData) {
379TEST(FlStandardMessageCodecTest, DecodeStringLengthNoData) {
384TEST(FlStandardMessageCodecTest, DecodeStringShortData1) {
389TEST(FlStandardMessageCodecTest, DecodeStringShortData2) {
394TEST(FlStandardMessageCodecTest, EncodeUint8ListEmpty) {
397 EXPECT_STREQ(hex_string,
"0800");
400TEST(FlStandardMessageCodecTest, EncodeUint8List) {
401 uint8_t
data[] = {0, 1, 2, 3, 4};
404 EXPECT_STREQ(hex_string,
"08050001020304");
407TEST(FlStandardMessageCodecTest, DecodeUint8ListEmpty) {
413TEST(FlStandardMessageCodecTest, DecodeUint8List) {
418 EXPECT_EQ(
data[0], 0);
419 EXPECT_EQ(
data[1], 1);
420 EXPECT_EQ(
data[2], 2);
421 EXPECT_EQ(
data[3], 3);
422 EXPECT_EQ(
data[4], 4);
425TEST(FlStandardMessageCodecTest, DecodeUint8ListNoData) {
430TEST(FlStandardMessageCodecTest, DecodeUint8ListLengthNoData) {
435TEST(FlStandardMessageCodecTest, DecodeUint8ListShortData1) {
440TEST(FlStandardMessageCodecTest, DecodeUint8ListShortData2) {
445TEST(FlStandardMessageCodecTest, EncodeInt32ListEmpty) {
448 EXPECT_STREQ(hex_string,
"09000000");
451TEST(FlStandardMessageCodecTest, EncodeInt32List) {
452 int32_t
data[] = {0, -1, 2, -3, 4};
455 EXPECT_STREQ(hex_string,
"0905000000000000ffffffff02000000fdffffff04000000");
458TEST(FlStandardMessageCodecTest, DecodeInt32ListEmpty) {
464TEST(FlStandardMessageCodecTest, DecodeInt32List) {
466 decode_message(
"0905000000000000ffffffff02000000fdffffff04000000");
469 EXPECT_EQ(
data[0], 0);
470 EXPECT_EQ(
data[1], -1);
471 EXPECT_EQ(
data[2], 2);
472 EXPECT_EQ(
data[3], -3);
473 EXPECT_EQ(
data[4], 4);
476TEST(FlStandardMessageCodecTest, DecodeInt32ListNoData) {
481TEST(FlStandardMessageCodecTest, DecodeInt32ListLengthNoData) {
486TEST(FlStandardMessageCodecTest, DecodeInt32ListShortData1) {
491TEST(FlStandardMessageCodecTest, DecodeInt32ListShortData2) {
497TEST(FlStandardMessageCodecTest, EncodeInt64ListEmpty) {
500 EXPECT_STREQ(hex_string,
"0a00000000000000");
503TEST(FlStandardMessageCodecTest, EncodeInt64List) {
504 int64_t
data[] = {0, -1, 2, -3, 4};
509 "0a050000000000000000000000000000ffffffffffffffff0200000000000000fdffffff"
510 "ffffffff0400000000000000");
513TEST(FlStandardMessageCodecTest, DecodeInt64ListEmpty) {
519TEST(FlStandardMessageCodecTest, DecodeInt64List) {
521 "0a050000000000000000000000000000ffffffffffffffff0200000000000000fdffffff"
522 "ffffffff0400000000000000");
525 EXPECT_EQ(
data[0], 0);
526 EXPECT_EQ(
data[1], -1);
527 EXPECT_EQ(
data[2], 2);
528 EXPECT_EQ(
data[3], -3);
529 EXPECT_EQ(
data[4], 4);
532TEST(FlStandardMessageCodecTest, DecodeInt64ListNoData) {
537TEST(FlStandardMessageCodecTest, DecodeInt64ListLengthNoData) {
542TEST(FlStandardMessageCodecTest, DecodeInt64ListShortData1) {
547TEST(FlStandardMessageCodecTest, DecodeInt64ListShortData2) {
549 "0a050000000000000000000000000000ffffffffffffffff0200000000000000fdffffff"
555TEST(FlStandardMessageCodecTest, EncodeFloat32ListEmpty) {
558 EXPECT_STREQ(hex_string,
"0e000000");
561TEST(FlStandardMessageCodecTest, EncodeFloat32List) {
562 float data[] = {0.0f, -0.5f, 0.25f, -0.125f, 0.00625f};
565 EXPECT_STREQ(hex_string,
"0e05000000000000000000bf0000803e000000becdcccc3b");
568TEST(FlStandardMessageCodecTest, DecodeFloat32ListEmpty) {
574TEST(FlStandardMessageCodecTest, DecodeFloat32List) {
576 decode_message(
"0e05000000000000000000bf0000803e000000becdcccc3b");
579 EXPECT_FLOAT_EQ(
data[0], 0.0f);
580 EXPECT_FLOAT_EQ(
data[1], -0.5f);
581 EXPECT_FLOAT_EQ(
data[2], 0.25f);
582 EXPECT_FLOAT_EQ(
data[3], -0.125f);
583 EXPECT_FLOAT_EQ(
data[4], 0.00625f);
586TEST(FlStandardMessageCodecTest, DecodeFloat32ListNoData) {
591TEST(FlStandardMessageCodecTest, DecodeFloat32ListLengthNoData) {
596TEST(FlStandardMessageCodecTest, DecodeFloat32ListShortData1) {
601TEST(FlStandardMessageCodecTest, DecodeFloat32ListShortData2) {
607TEST(FlStandardMessageCodecTest, EncodeFloatListEmpty) {
610 EXPECT_STREQ(hex_string,
"0b00000000000000");
613TEST(FlStandardMessageCodecTest, EncodeFloatList) {
614 double data[] = {0, -0.5, 0.25, -0.125, 0.00625};
619 "0b050000000000000000000000000000000000000000e0bf000000000000d03f00000000"
620 "0000c0bf9a9999999999793f");
623TEST(FlStandardMessageCodecTest, DecodeFloatListEmpty) {
629TEST(FlStandardMessageCodecTest, DecodeFloatList) {
631 "0b050000000000000000000000000000000000000000e0bf000000000000d03f00000000"
632 "0000c0bf9a9999999999793f");
635 EXPECT_FLOAT_EQ(
data[0], 0.0);
636 EXPECT_FLOAT_EQ(
data[1], -0.5);
637 EXPECT_FLOAT_EQ(
data[2], 0.25);
638 EXPECT_FLOAT_EQ(
data[3], -0.125);
639 EXPECT_FLOAT_EQ(
data[4], 0.00625);
642TEST(FlStandardMessageCodecTest, DecodeFloatListNoData) {
647TEST(FlStandardMessageCodecTest, DecodeFloatListLengthNoData) {
652TEST(FlStandardMessageCodecTest, DecodeFloatListShortData1) {
657TEST(FlStandardMessageCodecTest, DecodeFloatListShortData2) {
659 "0b050000000000000000000000000000000000000000e0bf000000000000d03f00000000"
665TEST(FlStandardMessageCodecTest, EncodeListEmpty) {
668 EXPECT_STREQ(hex_string,
"0c00");
671TEST(FlStandardMessageCodecTest, EncodeListTypes) {
683 "0c070001032a00000006000000000000182d4454fb210940070568656c6c6f0c000d00");
686TEST(FlStandardMessageCodecTest, EncodeListNested) {
689 for (
int i = 0;
i < 10;
i++) {
700 EXPECT_STREQ(hex_string,
701 "0c020c05030000000003020000000304000000030600000003080000000c"
702 "0503010000000303000000030500000003070000000309000000");
705TEST(FlStandardMessageCodecTest, DecodeListEmpty) {
711TEST(FlStandardMessageCodecTest, DecodeListTypes) {
713 "0c070001032a00000006000000000000182d4454fb210940070568656c6c6f0c000d00");
733 static_cast<size_t>(0));
737 static_cast<size_t>(0));
740TEST(FlStandardMessageCodecTest, DecodeListNested) {
742 "0c020c05030000000003020000000304000000030600000003080000000c"
743 "0503010000000303000000030500000003070000000309000000");
752 for (
int i = 0;
i < 5;
i++) {
763TEST(FlStandardMessageCodecTest, DecodeListNoData) {
768TEST(FlStandardMessageCodecTest, DecodeListLengthNoData) {
773TEST(FlStandardMessageCodecTest, DecodeListShortData1) {
778TEST(FlStandardMessageCodecTest, DecodeListShortData2) {
780 "0c070001032a00000006000000000000182d4454fb210940070568656c6c6f0c000d",
784TEST(FlStandardMessageCodecTest, EncodeDecodeLargeList) {
788 for (
int i = 0;
i < 65535;
i++) {
792 g_autoptr(GError)
error =
nullptr;
796 EXPECT_EQ(
error,
nullptr);
798 g_autoptr(
FlValue) decoded_value =
800 EXPECT_EQ(
error,
nullptr);
801 EXPECT_NE(
value,
nullptr);
806TEST(FlStandardMessageCodecTest, EncodeMapEmpty) {
809 EXPECT_STREQ(hex_string,
"0d00");
812TEST(FlStandardMessageCodecTest, EncodeMapKeyTypes) {
825 EXPECT_STREQ(hex_string,
826 "0d070007046e756c6c010704626f6f6c032a0000000703696e7406000000000"
827 "0182d4454fb2109400705666c6f6174070568656c6c6f0706737472696e670c"
828 "0007046c6973740d0007036d6170");
831TEST(FlStandardMessageCodecTest, EncodeMapValueTypes) {
844 EXPECT_STREQ(hex_string,
845 "0d0707046e756c6c000704626f6f6c010703696e74032a0000000705666c6f6"
846 "17406000000000000182d4454fb2109400706737472696e67070568656c6c6f"
847 "07046c6973740c0007036d61700d00");
850TEST(FlStandardMessageCodecTest, EncodeMapNested) {
853 const char* numbers[] = {
"zero",
"one",
"two",
"three",
nullptr};
854 for (
int i = 0; numbers[
i] !=
nullptr;
i++) {
864 EXPECT_STREQ(hex_string,
865 "0d02070a7374722d746f2d696e740d0407047a65726f030000000007036f6e6"
866 "50301000000070374776f0302000000070574687265650303000000070a696e"
867 "742d746f2d7374720d04030000000007047a65726f030100000007036f6e650"
868 "302000000070374776f030300000007057468726565");
871TEST(FlStandardMessageCodecTest, DecodeMapEmpty) {
877TEST(FlStandardMessageCodecTest, DecodeMapKeyTypes) {
879 "0d070007046e756c6c010704626f6f6c032a0000000703696e74060000000000182d4454"
880 "fb2109400705666c6f6174070568656c6c6f0706737472696e670c0007046c6973740d00"
922 static_cast<size_t>(0));
930 static_cast<size_t>(0));
936TEST(FlStandardMessageCodecTest, DecodeMapValueTypes) {
938 "0d0707046e756c6c000704626f6f6c010703696e74032a0000000705666c6f6174060000"
939 "00000000182d4454fb2109400706737472696e67070568656c6c6f07046c6973740c0007"
984 static_cast<size_t>(0));
992 static_cast<size_t>(0));
995TEST(FlStandardMessageCodecTest, DecodeMapNested) {
997 "0d02070a7374722d746f2d696e740d0407047a65726f030000000007036f6e6503010000"
998 "00070374776f0302000000070574687265650303000000070a696e742d746f2d7374720d"
999 "04030000000007047a65726f030100000007036f6e650302000000070374776f03030000"
1000 "0007057468726565");
1020 const char* numbers[] = {
"zero",
"one",
"two",
"three",
nullptr};
1021 for (
int i = 0; numbers[
i] !=
nullptr;
i++) {
1042TEST(FlStandardMessageCodecTest, DecodeMapNoData) {
1047TEST(FlStandardMessageCodecTest, DecodeMapLengthNoData) {
1052TEST(FlStandardMessageCodecTest, DecodeMapShortData1) {
1057TEST(FlStandardMessageCodecTest, DecodeMapShortData2) {
1059 "0d0707046e756c6c000704626f6f6c010703696e74032a0000000705666c6f6174060000"
1060 "00000000182d4454fb2109400706737472696e67070568656c6c6f07046c6973740c0007"
1065TEST(FlStandardMessageCodecTest, EncodeDecodeLargeMap) {
1069 for (
int i = 0;
i < 512;
i++) {
1070 g_autofree gchar*
key = g_strdup_printf(
"key%d",
i);
1074 g_autoptr(GError)
error =
nullptr;
1078 EXPECT_EQ(
error,
nullptr);
1080 g_autoptr(
FlValue) decoded_value =
1082 EXPECT_EQ(
error,
nullptr);
1083 EXPECT_NE(
value,
nullptr);
1088TEST(FlStandardMessageCodecTest, DecodeUnknownType) {
1094 fl_test_standard_message_codec,
1096 TEST_STANDARD_MESSAGE_CODEC,
1097 FlStandardMessageCodec)
1099struct _FlTestStandardMessageCodec {
1100 FlStandardMessageCodec parent_instance;
1104 fl_test_standard_message_codec,
1105 fl_standard_message_codec_get_type())
1107static gboolean write_custom_value1(FlStandardMessageCodec* codec,
1132 FlStandardMessageCodec* codec,
1143 return FL_STANDARD_MESSAGE_CODEC_CLASS(
1144 fl_test_standard_message_codec_parent_class)
1165 g_strndup(
static_cast<const gchar*
>(g_bytes_get_data(
buffer,
nullptr)) +
1182 FlStandardMessageCodec* codec,
1189 }
else if (
type == 129) {
1192 return FL_STANDARD_MESSAGE_CODEC_CLASS(
1193 fl_test_standard_message_codec_parent_class)
1199 FlTestStandardMessageCodecClass* klass) {
1200 FL_STANDARD_MESSAGE_CODEC_CLASS(klass)->write_value =
1202 FL_STANDARD_MESSAGE_CODEC_CLASS(klass)->read_value_of_type =
1207 FlTestStandardMessageCodec*
self) {
1209 FL_IS_TEST_STANDARD_MESSAGE_CODEC(
self);
1213 return FL_TEST_STANDARD_MESSAGE_CODEC(
1214 g_object_new(fl_test_standard_message_codec_get_type(),
nullptr));
1217TEST(FlStandardMessageCodecTest, DecodeCustomType) {
1218 g_autoptr(FlTestStandardMessageCodec) codec =
1228TEST(FlStandardMessageCodecTest, DecodeCustomTypes) {
1229 g_autoptr(FlTestStandardMessageCodec) codec =
1232 FL_MESSAGE_CODEC(codec));
1245TEST(FlStandardMessageCodecTest, EncodeCustomType) {
1247 g_autoptr(FlTestStandardMessageCodec) codec =
1249 g_autofree gchar* hex_string =
1251 EXPECT_STREQ(hex_string,
"800568656c6c6f");
1254TEST(FlStandardMessageCodecTest, EncodeCustomTypes) {
1258 g_autoptr(FlTestStandardMessageCodec) codec =
1260 g_autofree gchar* hex_string =
1262 EXPECT_STREQ(hex_string,
"0c02800568656c6c6f81");
1265TEST(FlStandardMessageCodecTest, EncodeDecode) {
1277 g_autoptr(GError)
error =
nullptr;
1281 EXPECT_EQ(
error,
nullptr);
1285 EXPECT_EQ(
error,
nullptr);
1286 EXPECT_NE(
output,
nullptr);
G_MODULE_EXPORT FlValue * fl_message_codec_decode_message(FlMessageCodec *self, GBytes *message, GError **error)
G_MODULE_EXPORT GBytes * fl_message_codec_encode_message(FlMessageCodec *self, FlValue *message, GError **error)
@ FL_MESSAGE_CODEC_ERROR_OUT_OF_DATA
@ FL_MESSAGE_CODEC_ERROR_UNSUPPORTED_TYPE
#define FL_MESSAGE_CODEC_ERROR
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 FlStandardMessageCodec * fl_standard_message_codec_new()
static void decode_error_value(const char *hex_string, GQuark domain, gint code)
G_DECLARE_FINAL_TYPE(FlTestStandardMessageCodec, fl_test_standard_message_codec, FL, TEST_STANDARD_MESSAGE_CODEC, FlStandardMessageCodec) struct _FlTestStandardMessageCodec
static FlValue * decode_message(const char *hex_string)
static FlValue * read_custom_value1(FlStandardMessageCodec *codec, GBytes *buffer, size_t *offset, GError **error)
static void fl_test_standard_message_codec_class_init(FlTestStandardMessageCodecClass *klass)
static FlValue * fl_test_standard_message_codec_read_value_of_type(FlStandardMessageCodec *codec, GBytes *buffer, size_t *offset, int type, GError **error)
fl_standard_message_codec_write_size(codec, buffer, length)
static FlTestStandardMessageCodec * fl_test_standard_message_codec_new()
static gchar * encode_string(const gchar *value)
static gchar * encode_float(double value)
static gchar * encode_int(int64_t value)
static FlValue * decode_message_with_codec(const char *hex_string, FlMessageCodec *codec)
GByteArray FlValue GError ** error
static gboolean fl_test_standard_message_codec_write_value(FlStandardMessageCodec *codec, GByteArray *buffer, FlValue *value, GError **error)
GByteArray FlValue * value
static gchar * encode_message_with_codec(FlValue *value, FlMessageCodec *codec)
G_DEFINE_TYPE(FlTestStandardMessageCodec, fl_test_standard_message_codec, fl_standard_message_codec_get_type()) static gboolean write_custom_value1(FlStandardMessageCodec *codec
TEST(FlStandardMessageCodecTest, EncodeNullptr)
static gchar * encode_message(FlValue *value)
g_byte_array_append(buffer, &type, sizeof(uint8_t))
static gchar * encode_bool(gboolean value)
static gboolean write_custom_value2(FlStandardMessageCodec *codec, GByteArray *buffer, FlValue *value, GError **error)
static FlValue * read_custom_value2(FlStandardMessageCodec *codec, GBytes *buffer, size_t *offset, GError **error)
static void fl_test_standard_message_codec_init(FlTestStandardMessageCodec *self)
GBytes * hex_string_to_bytes(const gchar *hex_string)
gchar * bytes_to_hex_string(GBytes *bytes)
G_MODULE_EXPORT void fl_value_set_string(FlValue *self, const gchar *key, FlValue *value)
G_MODULE_EXPORT FlValue * fl_value_new_map()
G_MODULE_EXPORT FlValue * fl_value_ref(FlValue *self)
G_MODULE_EXPORT const double * fl_value_get_float_list(FlValue *self)
G_MODULE_EXPORT void fl_value_set_string_take(FlValue *self, const gchar *key, FlValue *value)
G_MODULE_EXPORT int64_t fl_value_get_int(FlValue *self)
G_MODULE_EXPORT FlValue * fl_value_new_custom(int type, gconstpointer value, GDestroyNotify destroy_notify)
G_MODULE_EXPORT FlValueType fl_value_get_type(FlValue *self)
G_MODULE_EXPORT FlValue * fl_value_new_null()
G_MODULE_EXPORT FlValue * fl_value_new_float32_list(const float *data, size_t data_length)
G_MODULE_EXPORT FlValue * fl_value_new_string(const gchar *value)
G_MODULE_EXPORT FlValue * fl_value_new_int32_list(const int32_t *data, size_t data_length)
G_MODULE_EXPORT void fl_value_append(FlValue *self, FlValue *value)
G_MODULE_EXPORT FlValue * fl_value_get_map_key(FlValue *self, size_t index)
G_MODULE_EXPORT FlValue * fl_value_new_bool(bool value)
G_MODULE_EXPORT void fl_value_set_take(FlValue *self, FlValue *key, FlValue *value)
G_MODULE_EXPORT const gchar * fl_value_get_string(FlValue *self)
G_MODULE_EXPORT int fl_value_get_custom_type(FlValue *self)
G_MODULE_EXPORT FlValue * fl_value_new_int(int64_t value)
G_MODULE_EXPORT FlValue * fl_value_new_float(double value)
G_MODULE_EXPORT const uint8_t * fl_value_get_uint8_list(FlValue *self)
G_MODULE_EXPORT void fl_value_append_take(FlValue *self, FlValue *value)
G_MODULE_EXPORT gconstpointer fl_value_get_custom_value(FlValue *self)
G_MODULE_EXPORT FlValue * fl_value_get_list_value(FlValue *self, size_t index)
G_MODULE_EXPORT bool fl_value_get_bool(FlValue *self)
G_MODULE_EXPORT FlValue * fl_value_new_list()
G_MODULE_EXPORT FlValue * fl_value_new_uint8_list(const uint8_t *data, size_t data_length)
G_MODULE_EXPORT bool fl_value_equal(FlValue *a, FlValue *b)
G_MODULE_EXPORT FlValue * fl_value_new_float_list(const double *data, size_t data_length)
G_MODULE_EXPORT FlValue * fl_value_new_string_sized(const gchar *value, size_t value_length)
G_MODULE_EXPORT FlValue * fl_value_new_int64_list(const int64_t *data, size_t data_length)
G_MODULE_EXPORT const float * fl_value_get_float32_list(FlValue *self)
G_MODULE_EXPORT FlValue * fl_value_get_map_value(FlValue *self, size_t index)
G_MODULE_EXPORT double fl_value_get_float(FlValue *self)
G_MODULE_EXPORT size_t fl_value_get_length(FlValue *self)
G_MODULE_EXPORT const int32_t * fl_value_get_int32_list(FlValue *self)
G_MODULE_EXPORT const int64_t * fl_value_get_int64_list(FlValue *self)
typedefG_BEGIN_DECLS struct _FlValue FlValue
@ FL_VALUE_TYPE_FLOAT32_LIST
@ FL_VALUE_TYPE_INT32_LIST
@ FL_VALUE_TYPE_UINT8_LIST
@ FL_VALUE_TYPE_INT64_LIST
@ FL_VALUE_TYPE_FLOAT_LIST
std::shared_ptr< const fml::Mapping > data
#define EXPECT_TRUE(handle)