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

Fix the false failure caused by FlutterClippingMaskViewPool's random algorithm #42079

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2654,8 +2654,8 @@ - (void)testFlutterClippingMaskViewPoolReuseViewsAfterRecycle {
CGRect newRect = CGRectMake(0, 0, 10, 10);
FlutterClippingMaskView* view3 = [pool getMaskViewWithFrame:newRect];
FlutterClippingMaskView* view4 = [pool getMaskViewWithFrame:newRect];
XCTAssertEqual(view1, view3);
XCTAssertEqual(view2, view4);
// view3 and view4 should randomly get either of view1 and view2.
XCTAssertEqual([NSSet setWithObjects:view1, view2], [NSSet setWithObjects:view3, view4]);
XCTAssertTrue(CGRectEqualToRect(view3.frame, newRect));
XCTAssertTrue(CGRectEqualToRect(view4.frame, newRect));
}
Expand Down