Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit e11f3bd

Browse files
committed
fix unused variable warnings
1 parent cd2936a commit e11f3bd

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

packages/quick_actions/quick_actions_ios/example/ios/RunnerTests/FLTQuickActionsPluginTests.m

+12-7
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,10 @@ - (void)testApplicationDidBecomeActive_launchWithoutShortcut {
153153
[[QuickActionsPlugin alloc] initWithChannel:mockChannel
154154
shortcutStateManager:mockShortcutStateManager];
155155

156-
[plugin application:[UIApplication sharedApplication] didFinishLaunchingWithOptions:@{}];
156+
BOOL launchResult = [plugin application:[UIApplication sharedApplication]
157+
didFinishLaunchingWithOptions:@{}];
158+
XCTAssertTrue(launchResult,
159+
@"didFinishLaunchingWithOptions must return true if not launched from shortcut.");
157160
[plugin applicationDidBecomeActive:[UIApplication sharedApplication]];
158161
OCMVerify(never(), [mockChannel invokeMethod:OCMOCK_ANY arguments:OCMOCK_ANY]);
159162
}
@@ -172,9 +175,10 @@ - (void)testApplicationDidBecomeActive_launchWithShortcut {
172175
icon:[UIApplicationShortcutIcon
173176
iconWithTemplateImageName:@"search_the_thing.png"]
174177
userInfo:nil];
175-
[plugin application:[UIApplication sharedApplication]
176-
didFinishLaunchingWithOptions:@{UIApplicationLaunchOptionsShortcutItemKey : item}];
177-
178+
BOOL launchResult = [plugin application:[UIApplication sharedApplication]
179+
didFinishLaunchingWithOptions:@{UIApplicationLaunchOptionsShortcutItemKey : item}];
180+
XCTAssertFalse(launchResult,
181+
@"didFinishLaunchingWithOptions must return false if launched from shortcut.");
178182
[plugin applicationDidBecomeActive:[UIApplication sharedApplication]];
179183
OCMVerify([mockChannel invokeMethod:@"launch" arguments:item.type]);
180184
}
@@ -193,9 +197,10 @@ - (void)testApplicationDidBecomeActive_launchWithShortcut_becomeActiveTwice {
193197
icon:[UIApplicationShortcutIcon
194198
iconWithTemplateImageName:@"search_the_thing.png"]
195199
userInfo:nil];
196-
[plugin application:[UIApplication sharedApplication]
197-
didFinishLaunchingWithOptions:@{UIApplicationLaunchOptionsShortcutItemKey : item}];
198-
200+
BOOL launchResult = [plugin application:[UIApplication sharedApplication]
201+
didFinishLaunchingWithOptions:@{UIApplicationLaunchOptionsShortcutItemKey : item}];
202+
XCTAssertFalse(launchResult,
203+
@"didFinishLaunchingWithOptions must return false if launched from shortcut.");
199204
[plugin applicationDidBecomeActive:[UIApplication sharedApplication]];
200205
[plugin applicationDidBecomeActive:[UIApplication sharedApplication]];
201206
// shortcut should only be handled once per launch.

0 commit comments

Comments
 (0)