5#import <OCMock/OCMock.h>
6#import <XCTest/XCTest.h>
8#import "flutter/shell/platform/darwin/ios/framework/Headers/FlutterEngineGroup.h"
9#import "flutter/shell/platform/darwin/ios/framework/Source/FlutterEngine_Test.h"
33 XCTAssertNotNil(spawner);
34 XCTAssertNotNil(spawnee);
43 XCTAssertNotNil(spawner);
46 XCTAssertNotNil(spawnee);
53 OCMStub([
group makeEngine]).andReturn(mockEngine);
54 OCMStub([mockEngine spawnWithEntrypoint:[OCMArg
any]
55 libraryURI:[OCMArg
any]
56 initialRoute:[OCMArg
any]
57 entrypointArgs:[OCMArg
any]])
61 XCTAssertNotNil(spawner);
62 OCMVerify([spawner runWithEntrypoint:
@"firstEntrypoint"
63 libraryURI:
@"firstLibraryURI"
69 XCTAssertNotNil(spawnee);
70 OCMVerify([spawner spawnWithEntrypoint:
@"secondEntrypoint"
71 libraryURI:
@"secondLibraryURI"
80 OCMStub([
group makeEngine]).andReturn(mockEngine);
81 OCMStub([mockEngine spawnWithEntrypoint:[OCMArg
any]
82 libraryURI:[OCMArg
any]
83 initialRoute:[OCMArg
any]
84 entrypointArgs:[OCMArg
any]])
87 XCTAssertNotNil(spawner);
88 OCMVerify([spawner runWithEntrypoint:nil libraryURI:nil initialRoute:
@"foo" entrypointArgs:nil]);
91 XCTAssertNotNil(spawnee);
92 OCMVerify([spawner spawnWithEntrypoint:nil
102 OCMStub([
group makeEngine]).andReturn(mockEngine);
103 OCMStub([mockEngine spawnWithEntrypoint:[OCMArg
any]
104 libraryURI:[OCMArg
any]
105 initialRoute:[OCMArg
any]
106 entrypointArgs:[OCMArg
any]])
109 NSArray* firstEntrypointArgs = @[ @"foo", @"first" ];
112 XCTAssertNotNil(spawner);
113 OCMVerify([spawner runWithEntrypoint:nil
116 entrypointArgs:firstEntrypointArgs]);
118 NSArray* secondEntrypointArgs = @[ @"bar", @"second" ];
122 XCTAssertNotNil(spawnee);
123 OCMVerify([spawner spawnWithEntrypoint:nil
126 entrypointArgs:secondEntrypointArgs]);
134 project:mockProject];
135 XCTAssertNotNil(
group);
136 weakProject = mockProject;
137 XCTAssertNotNil(weakProject);
141 XCTAssertNil(weakProject);
NSArray< NSString * > * entrypointArgs
void testReleasesProjectOnDealloc()
void testCustomEntrypointArgs()
void testCustomInitialRoute()
void testDeleteLastEngine()
void testCustomEntrypoint()
FlutterEngine * makeEngine()
FlutterEngine * makeEngineWithEntrypoint:libraryURI:initialRoute:(nullable NSString *entrypoint,[libraryURI] nullable NSString *libraryURI,[initialRoute] nullable NSString *initialRoute)
FlutterEngine * makeEngineWithEntrypoint:libraryURI:(nullable NSString *entrypoint,[libraryURI] nullable NSString *libraryURI)
FlutterEngine * makeEngineWithOptions:(nullable FlutterEngineGroupOptions *options)
const flutter::ThreadHost & threadHost()
SIT bool any(const Vec< 1, T > &x)