| Flutter Linux Embedder |

fl_application_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 "gtest/gtest.h"
6
7 #include "flutter/shell/platform/linux/public/flutter_linux/fl_application.h"
8
9 TEST(FlApplicationTest, ConstructorArgs) {
10 g_autoptr(FlApplication) app =
11 fl_application_new("com.example.TestApplication",
12 #ifdef GLIB_VERSION_2_74
13 G_APPLICATION_DEFAULT_FLAGS
14 #else
15 G_APPLICATION_FLAGS_NONE
16 #endif
17 );
18
19 EXPECT_STREQ(g_application_get_application_id(G_APPLICATION(app)),
20 "com.example.TestApplication");
21
22 #ifdef GLIB_VERSION_2_74
23 EXPECT_EQ(g_application_get_flags(G_APPLICATION(app)),
24 G_APPLICATION_DEFAULT_FLAGS);
25 #else
26 EXPECT_EQ(g_application_get_flags(G_APPLICATION(app)),
27 G_APPLICATION_FLAGS_NONE);
28 #endif
29 }
fl_application_new
G_MODULE_EXPORT FlApplication * fl_application_new(const gchar *application_id, GApplicationFlags flags)
Definition: fl_application.cc:182
fl_application.h
TEST
TEST(FlApplicationTest, ConstructorArgs)
Definition: fl_application_test.cc:9
g_autoptr
g_autoptr(GMutexLocker) locker