#include "flutter/shell/platform/linux/public/flutter_linux/fl_engine.h"
#include "flutter/shell/platform/linux/public/flutter_linux/fl_value.h"
#include <glib.h>
#include <stdint.h>
#include <ostream>
Go to the source code of this file.
◆ bytes_to_hex_string()
gchar * bytes_to_hex_string |
( |
GBytes * |
bytes | ) |
|
Definition at line 52 of file fl_test.cc.
52 {
53 GString* hex_string = g_string_new("");
54 size_t data_length;
56 static_cast<const uint8_t*>(g_bytes_get_data(bytes, &data_length));
57 for (size_t i = 0; i < data_length; i++) {
58 g_string_append_printf(hex_string, "%02x", data[i]);
59 }
60 return g_string_free(hex_string,
FALSE);
61}
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot data
◆ hex_string_to_bytes()
G_BEGIN_DECLS GBytes * hex_string_to_bytes |
( |
const gchar * |
hex_string | ) |
|
Definition at line 43 of file fl_test.cc.
43 {
44 GByteArray*
buffer = g_byte_array_new();
45 for (int i = 0; hex_string[i] != '\0' && hex_string[i + 1] != '\0'; i += 2) {
48 }
49 return g_byte_array_free_to_bytes(
buffer);
50}
static const uint8_t buffer[]
g_byte_array_append(buffer, &type, sizeof(uint8_t))
static uint8_t parse_hex8(const gchar *hex_string)
◆ make_mock_engine()
FlEngine * make_mock_engine |
( |
| ) |
|
Definition at line 63 of file fl_test.cc.
63 {
66}
G_MODULE_EXPORT FlDartProject * fl_dart_project_new()
FlEngine * make_mock_engine_with_project(FlDartProject *project)
◆ make_mock_engine_with_project()
FlEngine * make_mock_engine_with_project |
( |
FlDartProject * |
project | ) |
|
Definition at line 68 of file fl_test.cc.
68 {
71 g_autoptr(GError) engine_error = nullptr;
73 EXPECT_EQ(engine_error, nullptr);
74
75 return static_cast<FlEngine*
>(g_object_ref(
engine));
76}
FlEngine * fl_engine_new(FlDartProject *project, FlRenderer *renderer)
gboolean fl_engine_start(FlEngine *self, GError **error)
FlMockRenderer * fl_mock_renderer_new()
#define EXPECT_TRUE(handle)
◆ PrintTo()
void PrintTo |
( |
FlValue * |
v, |
|
|
std::ostream * |
os |
|
) |
| |
Definition at line 78 of file fl_test.cc.
78 {
81}
G_MODULE_EXPORT gchar * fl_value_to_string(FlValue *value)