Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add a test
  • Loading branch information
robert-ancell committed Aug 20, 2024
commit 457bf8c145771a99ea4081da9226a7d451931de6
6 changes: 4 additions & 2 deletions ci/licenses_golden/licenses_flutter
Original file line number Diff line number Diff line change
Expand Up @@ -44777,7 +44777,7 @@ ORIGIN: ../../../flutter/shell/platform/linux/fl_accessible_text_field.cc + ../.
ORIGIN: ../../../flutter/shell/platform/linux/fl_accessible_text_field.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/shell/platform/linux/fl_accessible_text_field_test.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/shell/platform/linux/fl_application.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/shell/platform/linux/fl_application.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/shell/platform/linux/fl_application_test.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/shell/platform/linux/fl_basic_message_channel.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/shell/platform/linux/fl_basic_message_channel_test.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/shell/platform/linux/fl_binary_codec.cc + ../../../flutter/LICENSE
Expand Down Expand Up @@ -44899,6 +44899,7 @@ ORIGIN: ../../../flutter/shell/platform/linux/fl_window_state_monitor_test.cc +
ORIGIN: ../../../flutter/shell/platform/linux/key_mapping.g.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/shell/platform/linux/key_mapping.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/shell/platform/linux/key_mapping_test.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/shell/platform/linux/public/flutter_linux/fl_application.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/shell/platform/linux/public/flutter_linux/fl_basic_message_channel.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/shell/platform/linux/public/flutter_linux/fl_binary_codec.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/shell/platform/linux/public/flutter_linux/fl_binary_messenger.h + ../../../flutter/LICENSE
Expand Down Expand Up @@ -47690,7 +47691,7 @@ FILE: ../../../flutter/shell/platform/linux/fl_accessible_text_field.cc
FILE: ../../../flutter/shell/platform/linux/fl_accessible_text_field.h
FILE: ../../../flutter/shell/platform/linux/fl_accessible_text_field_test.cc
FILE: ../../../flutter/shell/platform/linux/fl_application.cc
FILE: ../../../flutter/shell/platform/linux/fl_application.h
FILE: ../../../flutter/shell/platform/linux/fl_application_test.cc
FILE: ../../../flutter/shell/platform/linux/fl_basic_message_channel.cc
FILE: ../../../flutter/shell/platform/linux/fl_basic_message_channel_test.cc
FILE: ../../../flutter/shell/platform/linux/fl_binary_codec.cc
Expand Down Expand Up @@ -47812,6 +47813,7 @@ FILE: ../../../flutter/shell/platform/linux/fl_window_state_monitor_test.cc
FILE: ../../../flutter/shell/platform/linux/key_mapping.g.cc
FILE: ../../../flutter/shell/platform/linux/key_mapping.h
FILE: ../../../flutter/shell/platform/linux/key_mapping_test.cc
FILE: ../../../flutter/shell/platform/linux/public/flutter_linux/fl_application.h
FILE: ../../../flutter/shell/platform/linux/public/flutter_linux/fl_basic_message_channel.h
FILE: ../../../flutter/shell/platform/linux/public/flutter_linux/fl_binary_codec.h
FILE: ../../../flutter/shell/platform/linux/public/flutter_linux/fl_binary_messenger.h
Expand Down
2 changes: 2 additions & 0 deletions shell/platform/linux/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ executable("flutter_linux_unittests") {
sources = [
"fl_accessible_node_test.cc",
"fl_accessible_text_field_test.cc",
"fl_application_test.cc",
"fl_basic_message_channel_test.cc",
"fl_binary_codec_test.cc",
"fl_binary_messenger_test.cc",
Expand Down Expand Up @@ -240,6 +241,7 @@ executable("flutter_linux_unittests") {
"testing/mock_binary_messenger_response_handle.cc",
"testing/mock_engine.cc",
"testing/mock_epoxy.cc",
"testing/mock_gtk.cc",
"testing/mock_im_context.cc",
"testing/mock_plugin_registrar.cc",
"testing/mock_renderer.cc",
Expand Down
17 changes: 17 additions & 0 deletions shell/platform/linux/fl_application_test.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "gtest/gtest.h"

#include "flutter/shell/platform/linux/public/flutter_linux/fl_application.h"

TEST(FlApplicationTest, ConstructorArgs) {
g_autoptr(FlApplication) app = fl_application_new(
"com.example.TestApplication", G_APPLICATION_FLAGS_NONE);

EXPECT_STREQ(g_application_get_application_id(G_APPLICATION(app)),
"com.example.TestApplication");
EXPECT_EQ(g_application_get_flags(G_APPLICATION(app)),
G_APPLICATION_FLAGS_NONE);
}