6#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterEngineTestUtils.h"
8#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterDartProject_Internal.h"
9#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterEngine_Internal.h"
11#include "flutter/testing/testing.h"
25 size_t changeCount = (_result != nil) ? 1 : 0;
30- (NSString*)stringForType:(NSPasteboardType)dataType {
34- (
BOOL)setString:(NSString*)
string forType:(NSPasteboardType)dataType {
43FlutterEngineTest::FlutterEngineTest() =
default;
45void FlutterEngineTest::SetUp() {
46 native_resolver_ = std::make_shared<TestDartNativeResolver>();
49 initWithAssetsPath:fixtures
50 ICUDataPath:[fixtures stringByAppendingString:@"/icudtl.dat"]];
51 project_.rootIsolateCreateCallback = FlutterEngineTest::IsolateCreateCallback;
54 allowHeadlessExecution:true];
57void FlutterEngineTest::TearDown() {
60 native_resolver_.reset();
63void FlutterEngineTest::ShutDownEngine() {
68void FlutterEngineTest::IsolateCreateCallback(
void*
user_data) {
69 native_resolver_->SetNativeResolverForIsolate();
79 initWithAssetsPath:fixtures
80 ICUDataPath:[fixtures stringByAppendingString:@"/icudtl.dat"]];
83 allowHeadlessExecution:true];
88 id engineMock = OCMPartialMock(
engine);
92MockFlutterEngineTest::MockFlutterEngineTest() =
default;
94void MockFlutterEngineTest::SetUp() {
98void MockFlutterEngineTest::TearDown() {
99 [engine_mock_ shutDownEngine];
100 [engine_mock_ stopMocking];
104void MockFlutterEngineTest::ShutDownEngine() {
105 [engine_mock_ shutDownEngine];
void(* Dart_NativeFunction)(Dart_NativeArguments arguments)
Dart_NativeFunction function
BOOL setString:forType:(NSString *string, [forType] NSPasteboardType dataType)
NSInteger clearContents()
FlutterPasteboard * pasteboard
const char * GetFixturesPath()
Returns the directory containing the test fixture for the target if this target has fixtures configur...
id CreateMockFlutterEngine(NSString *pasteboardString)
DEF_SWITCHES_START aot vmservice shared library name