Skip to content

Commit

Permalink
NO means NO
Browse files Browse the repository at this point in the history
  • Loading branch information
gspencergoog committed May 16, 2023
1 parent f3af486 commit 917809f
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ - (nonnull NSView*)createWithViewIdentifier:(int64_t)viewId arguments:(nullable
TEST_F(FlutterEngineTest, HandlesTerminationRequest) {
id engineMock = CreateMockFlutterEngine(nil);
__block NSString* nextResponse = @"exit";
__block BOOL triedToTerminate = FALSE;
__block BOOL triedToTerminate = NO;
FlutterEngineTerminationHandler* terminationHandler =
[[FlutterEngineTerminationHandler alloc] initWithEngine:engineMock
terminator:^(id sender) {
Expand Down Expand Up @@ -745,7 +745,7 @@ - (nonnull NSView*)createWithViewIdentifier:(int64_t)viewId arguments:(nullable
arguments:@{@"type" : @"cancelable"}];

// Always terminate when the binding isn't ready (which is the default).
triedToTerminate = FALSE;
triedToTerminate = NO;
calledAfterTerminate = @"";
nextResponse = @"cancel";
[engineMock handleMethodCall:methodExitApplication result:appExitResult];
Expand All @@ -754,22 +754,22 @@ - (nonnull NSView*)createWithViewIdentifier:(int64_t)viewId arguments:(nullable

// Once the binding is ready, handle the request.
terminationHandler.acceptingRequests = YES;
triedToTerminate = FALSE;
triedToTerminate = NO;
calledAfterTerminate = @"";
nextResponse = @"exit";
[engineMock handleMethodCall:methodExitApplication result:appExitResult];
EXPECT_STREQ([calledAfterTerminate UTF8String], "exit");
EXPECT_TRUE(triedToTerminate);

triedToTerminate = FALSE;
triedToTerminate = NO;
calledAfterTerminate = @"";
nextResponse = @"cancel";
[engineMock handleMethodCall:methodExitApplication result:appExitResult];
EXPECT_STREQ([calledAfterTerminate UTF8String], "cancel");
EXPECT_FALSE(triedToTerminate);

// Check that it doesn't crash on error.
triedToTerminate = FALSE;
triedToTerminate = NO;
calledAfterTerminate = @"";
nextResponse = @"error";
[engineMock handleMethodCall:methodExitApplication result:appExitResult];
Expand All @@ -778,7 +778,7 @@ - (nonnull NSView*)createWithViewIdentifier:(int64_t)viewId arguments:(nullable
}

TEST_F(FlutterEngineTest, HandleAccessibilityEvent) {
__block BOOL announced = FALSE;
__block BOOL announced = NO;
id engineMock = CreateMockFlutterEngine(nil);

OCMStub([engineMock announceAccessibilityMessage:[OCMArg any]
Expand Down

0 comments on commit 917809f

Please sign in to comment.