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 2 commits
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
2 changes: 1 addition & 1 deletion BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ group("unittests") {
if (is_mac) {
public_deps += [
"//flutter/impeller/golden_tests:impeller_golden_tests",
"//flutter/shell/platform/darwin:flutter_channels_unittests",
"//flutter/shell/platform/darwin/common:framework_shared_unittests",
"//flutter/third_party/spring_animation:spring_animation_unittests",
]
}
Expand Down
68 changes: 0 additions & 68 deletions shell/platform/darwin/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
assert(is_mac || is_ios)

import("//flutter/shell/platform/config.gni")
import("//flutter/testing/testing.gni")

group("darwin") {
if (is_ios) {
Expand All @@ -18,70 +17,3 @@ group("darwin") {
}
}
}

source_set("flutter_channels") {
cflags_objc = flutter_cflags_objc
cflags_objcc = flutter_cflags_objcc

sources = [
"common/buffer_conversions.h",
"common/buffer_conversions.mm",
]

deps = [ "//flutter/fml" ]

public_deps = [ ":flutter_channels_arc" ]

public_configs = [ "//flutter:config" ]
}

source_set("flutter_channels_arc") {
cflags_objc = flutter_cflags_objc_arc
cflags_objcc = flutter_cflags_objcc_arc

sources = [
"common/framework/Headers/FlutterBinaryMessenger.h",
"common/framework/Headers/FlutterChannels.h",
"common/framework/Headers/FlutterCodecs.h",
"common/framework/Headers/FlutterMacros.h",
"common/framework/Source/FlutterChannels.mm",
"common/framework/Source/FlutterCodecs.mm",
"common/framework/Source/FlutterStandardCodec.mm",
"common/framework/Source/FlutterStandardCodecHelper.cc",
"common/framework/Source/FlutterStandardCodec_Internal.h",
]

public = [
"common/framework/Headers/FlutterBinaryMessenger.h",
"common/framework/Headers/FlutterChannels.h",
"common/framework/Headers/FlutterCodecs.h",
"common/framework/Headers/FlutterMacros.h",
"common/framework/Source/FlutterStandardCodec_Internal.h",
]

public_configs = [ "//flutter:config" ]

deps = [ "//flutter/fml" ]
}

test_fixtures("flutter_channels_fixtures") {
fixtures = []
}

executable("flutter_channels_unittests") {
testonly = true

sources = [
"common/framework/Source/flutter_codecs_unittest.mm",
"common/framework/Source/flutter_standard_codec_unittest.mm",
]

deps = [
":flutter_channels",
":flutter_channels_fixtures",
"//flutter/testing",
"//third_party/dart/runtime:libdart_jit",
]

public_configs = [ "//flutter:config" ]
}
26 changes: 26 additions & 0 deletions shell/platform/darwin/common/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

assert(is_mac || is_ios)

import("//flutter/common/config.gni")
import("//flutter/testing/testing.gni")
import("framework_shared.gni")

source_set("common") {
Expand Down Expand Up @@ -56,3 +59,26 @@ source_set("framework_shared") {

deps = [ "//flutter/fml" ]
}

test_fixtures("flutter_channels_fixtures") {
fixtures = []
}

# Unit tests for channels.
executable("framework_shared_unittests") {
testonly = true

sources = [
"framework/Source/flutter_codecs_unittest.mm",
"framework/Source/flutter_standard_codec_unittest.mm",
]

deps = [
":flutter_channels_fixtures",
":framework_shared",
"//flutter/testing",
"//third_party/dart/runtime:libdart_jit",
]

public_configs = [ "//flutter:config" ]
}
2 changes: 1 addition & 1 deletion testing/run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ def make_test(name, flags=None, extra_env=None):
unittests += [
# The accessibility library only supports Mac and Windows.
make_test('accessibility_unittests'),
make_test('flutter_channels_unittests'),
make_test('framework_shared_unittests'),
make_test('spring_animation_unittests'),
]

Expand Down