This repository was archived by the owner on Feb 25, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +31
-1
lines changed
shell/platform/darwin/macos Expand file tree Collapse file tree 3 files changed +31
-1
lines changed Original file line number Diff line number Diff line change @@ -1027,6 +1027,7 @@ FILE: ../../../flutter/shell/platform/darwin/macos/framework/Source/FlutterTextI
10271027FILE: ../../../flutter/shell/platform/darwin/macos/framework/Source/FlutterView.h
10281028FILE: ../../../flutter/shell/platform/darwin/macos/framework/Source/FlutterView.mm
10291029FILE: ../../../flutter/shell/platform/darwin/macos/framework/Source/FlutterViewController.mm
1030+ FILE: ../../../flutter/shell/platform/darwin/macos/framework/Source/FlutterViewControllerTest.mm
10301031FILE: ../../../flutter/shell/platform/darwin/macos/framework/Source/FlutterViewController_Internal.h
10311032FILE: ../../../flutter/shell/platform/darwin/macos/framework/Source/fixtures/flutter_desktop_test.dart
10321033FILE: ../../../flutter/shell/platform/darwin/macos/framework/module.modulemap
Original file line number Diff line number Diff line change @@ -101,7 +101,10 @@ test_fixtures("flutter_desktop_darwin_fixtures") {
101101executable (" flutter_desktop_darwin_unittests" ) {
102102 testonly = true
103103
104- sources = [ " framework/Source/FlutterEngineUnittests.mm" ]
104+ sources = [
105+ " framework/Source/FlutterEngineUnittests.mm" ,
106+ " framework/Source/FlutterViewControllerTest.mm"
107+ ]
105108
106109 cflags_objcc = [ " -fobjc-arc" ]
107110
Original file line number Diff line number Diff line change 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 " flutter/shell/platform/darwin/macos/framework/Headers/FlutterEngine.h"
6+ #include " flutter/shell/platform/darwin/macos/framework/Source/FlutterDartProject_Internal.h"
7+ #include " flutter/shell/platform/darwin/macos/framework/Source/FlutterEngine_Internal.h"
8+ #include " flutter/testing/testing.h"
9+
10+ namespace flutter ::testing {
11+
12+ // TODO(justinmc): This is just copied from FlutterEngineUnittests.
13+ TEST (FlutterViewControllerTest, MacOSTestTest) {
14+ NSString * fixtures = @(testing::GetFixturesPath ());
15+ FlutterDartProject* project = [[FlutterDartProject alloc ]
16+ initWithAssetsPath: fixtures
17+ ICUDataPath: [fixtures stringByAppendingString: @" /icudtl.dat" ]];
18+ FlutterEngine* engine = [[FlutterEngine alloc ] initWithName: @" test"
19+ project: project
20+ allowHeadlessExecution: true ];
21+ ASSERT_TRUE ([engine runWithEntrypoint: @" main" ]);
22+ ASSERT_TRUE (engine.running );
23+ [engine shutDownEngine ];
24+ }
25+
26+ } // flutter::testing
You can’t perform that action at this time.
0 commit comments