Flutter Engine
FlutterEngineUnittests.mm
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 #import "flutter/shell/platform/darwin/macos/framework/Headers/FlutterEngine.h"
6 #import "flutter/shell/platform/darwin/macos/framework/Source/FlutterDartProject_Internal.h"
7 #import "flutter/shell/platform/darwin/macos/framework/Source/FlutterEngine_Internal.h"
8 #include "flutter/testing/testing.h"
9 
10 namespace flutter::testing {
11 
12 TEST(FlutterEngineTest, FlutterEngineCanLaunch) {
13  NSString* fixtures = @(testing::GetFixturesPath());
14  FlutterDartProject* project = [[FlutterDartProject alloc]
15  initWithAssetsPath:fixtures
16  ICUDataPath:[fixtures stringByAppendingString:@"/icudtl.dat"]];
17  FlutterEngine* engine = [[FlutterEngine alloc] initWithName:@"test"
18  project:project
19  allowHeadlessExecution:true];
20  ASSERT_TRUE([engine runWithEntrypoint:@"main"]);
21  ASSERT_TRUE(engine.running);
22  [engine shutDownEngine];
23 }
24 
25 } // flutter::testing
const char * GetFixturesPath()
Returns the directory containing the test fixture for the target if this target has fixtures configur...
TEST(EmbeddedViewParams, GetBoundingRectAfterMutationsWithNoMutations)