Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
fl_test.h
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#ifndef FLUTTER_SHELL_PLATFORM_LINUX_TESTING_FL_TEST_H_
6#define FLUTTER_SHELL_PLATFORM_LINUX_TESTING_FL_TEST_H_
7
8#include "flutter/shell/platform/linux/public/flutter_linux/fl_engine.h"
9#include "flutter/shell/platform/linux/public/flutter_linux/fl_value.h"
10
11#include <glib.h>
12#include <stdint.h>
13#include <ostream>
14
15G_BEGIN_DECLS
16
17// Helper functions for the tests. This is not included in the shell library.
18
19// Helper function to convert a hexadecimal string (e.g. "01feab") into GBytes
20GBytes* hex_string_to_bytes(const gchar* hex_string);
21
22// Helper function to convert GBytes into a hexadecimal string (e.g. "01feab")
23gchar* bytes_to_hex_string(GBytes* bytes);
24
25// Creates a mock engine that responds to platform messages.
26FlEngine* make_mock_engine();
27
28// Creates a mock engine using a specified FlDartProject that responds to
29// platform messages.
30FlEngine* make_mock_engine_with_project(FlDartProject* project);
31
32// GTest printer for FlValue.
33void PrintTo(FlValue* v, std::ostream* os);
34
35G_END_DECLS
36
37#endif // FLUTTER_SHELL_PLATFORM_LINUX_TESTING_FL_TEST_H_
FlEngine * make_mock_engine_with_project(FlDartProject *project)
Definition fl_test.cc:68
void PrintTo(FlValue *v, std::ostream *os)
Definition fl_test.cc:78
FlEngine * make_mock_engine()
Definition fl_test.cc:63
G_BEGIN_DECLS 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
typedefG_BEGIN_DECLS struct _FlValue FlValue
Definition fl_value.h:42