Skip to content

Commit

Permalink
Add more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
xtyxtyx committed Dec 29, 2024
1 parent 2e2dfae commit 1e31812
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions Tests/ShaftTests/Gesture/TapAndDragTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -333,4 +333,25 @@ class TapAndDragTest: XCTestCase {
XCTAssertEqual(events, ["down#1", "up#1"])
}
}

func test_Recognizer_rejects_pointer_that_is_not_the_primary_one_FILO_before_acceptance() {
testGesture { [self] tester in
setUpTapAndPanGestureRecognizer()

tapAndDrag.addPointer(event: down1)
tapAndDrag.addPointer(event: down2)
tester.closeArena(1)
tester.route(down1)

tester.closeArena(2)
tester.route(down2)

tester.route(up2)
GestureBinding.shared.gestureArena.sweep(2)

tester.route(up1)
GestureBinding.shared.gestureArena.sweep(1)
XCTAssertEqual(events, ["down#1", "up#1"])
}
}
}

0 comments on commit 1e31812

Please sign in to comment.