diff --git a/shell/platform/darwin/ios/framework/Source/FlutterTextInputPluginTest.mm b/shell/platform/darwin/ios/framework/Source/FlutterTextInputPluginTest.mm index ec39029c67c8c..be00f6e1e63d4 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterTextInputPluginTest.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterTextInputPluginTest.mm @@ -237,7 +237,7 @@ - (void)testNoDanglingEnginePointer { @autoreleasepool { FlutterEngine* flutterEngine = OCMClassMock([FlutterEngine class]); weakFlutterEngine = flutterEngine; - NSAssert(weakFlutterEngine, @"flutter engine must not be nil"); + XCTAssertNotNil(weakFlutterEngine, @"flutter engine must not be nil"); FlutterTextInputPlugin* flutterTextInputPlugin = [[FlutterTextInputPlugin alloc] initWithDelegate:(id)flutterEngine]; weakFlutterTextInputPlugin = flutterTextInputPlugin; @@ -254,8 +254,8 @@ - (void)testNoDanglingEnginePointer { currentView = flutterTextInputPlugin.activeView; } - NSAssert(!weakFlutterEngine, @"flutter engine must be nil"); - NSAssert(currentView, @"current view must not be nil"); + XCTAssertNil(weakFlutterEngine, @"flutter engine must be nil"); + XCTAssertNotNil(currentView, @"current view must not be nil"); XCTAssertNil(weakFlutterTextInputPlugin); // Verify that the view can no longer access the deallocated engine/text input plugin