Flutter Engine
The Flutter Engine
Functions
fl_plugin_registrar_test.cc File Reference
#include <gtk/gtk.h>
#include "gtest/gtest.h"
#include "flutter/shell/platform/linux/fl_binary_messenger_private.h"
#include "flutter/shell/platform/linux/fl_texture_registrar_private.h"
#include "flutter/shell/platform/linux/public/flutter_linux/fl_plugin_registrar.h"
#include "flutter/shell/platform/linux/testing/fl_test.h"
#include "flutter/shell/platform/linux/testing/mock_plugin_registrar.h"

Go to the source code of this file.

Functions

 TEST (FlPluginRegistrarTest, FlMockRegistrar)
 

Function Documentation

◆ TEST()

TEST ( FlPluginRegistrarTest  ,
FlMockRegistrar   
)

Definition at line 17 of file fl_plugin_registrar_test.cc.

17 {
18 g_autoptr(FlEngine) engine = make_mock_engine();
19 g_autoptr(FlBinaryMessenger) messenger = fl_binary_messenger_new(engine);
20 g_autoptr(FlTextureRegistrar) texture_registrar =
22
23 g_autoptr(FlPluginRegistrar) registrar =
25 EXPECT_TRUE(FL_IS_MOCK_PLUGIN_REGISTRAR(registrar));
26
27 EXPECT_EQ(fl_plugin_registrar_get_messenger(registrar), messenger);
30}
FlutterEngine engine
Definition: main.cc:68
FlBinaryMessenger * fl_binary_messenger_new(FlEngine *engine)
static FlEngine * make_mock_engine()
G_MODULE_EXPORT FlTextureRegistrar * fl_plugin_registrar_get_texture_registrar(FlPluginRegistrar *self)
G_MODULE_EXPORT FlBinaryMessenger * fl_plugin_registrar_get_messenger(FlPluginRegistrar *self)
FlTextureRegistrar * fl_texture_registrar_new(FlEngine *engine)
FlPluginRegistrar * fl_mock_plugin_registrar_new(FlBinaryMessenger *messenger, FlTextureRegistrar *texture_registrar)
G_BEGIN_DECLS FlTextureRegistrar * texture_registrar
#define EXPECT_TRUE(handle)
Definition: unit_test.h:678