Skip to content

Commit

Permalink
[webview_flutter_wkwebview] Return an NSNumber that represents a bool (
Browse files Browse the repository at this point in the history
  • Loading branch information
bparrishMines authored Jun 15, 2022
1 parent 1410600 commit 3b183f7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ - (void)testRemoveDataOfTypes {
blockError = error;
}];
XCTAssertEqualObjects(returnValue, @YES);
// Asserts whether the NSNumber will be deserialized by the standard codec as a boolean.
XCTAssertEqual(CFGetTypeID((__bridge CFTypeRef)(returnValue)), CFBooleanGetTypeID());
XCTAssertNil(blockError);
}
@end
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ - (void)createDefaultDataStoreWithIdentifier:(nonnull NSNumber *)identifier
modifiedSince:[NSDate dateWithTimeIntervalSince1970:
modificationTimeInSecondsSinceEpoch.doubleValue]
completionHandler:^{
completion(@(records.count > 0), nil);
completion([NSNumber numberWithBool:(records.count > 0)], nil);
}];
}];
}
Expand Down

0 comments on commit 3b183f7

Please sign in to comment.