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 4, 2023
1 parent 36cf0b2 commit 8cfacdf
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,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 @@ -743,7 +743,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 @@ -752,22 +752,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 @@ -776,7 +776,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 8cfacdf

Please sign in to comment.