| 7 | namespace snap::drawing { |
| 8 | |
| 9 | TEST(SingleTapGestureRecognizer, canHandleSingleTap) { |
| 10 | auto container = makeContainer(0, 0, 100, 100); |
| 11 | |
| 12 | auto childView = createView(25, 25, 25, 25); |
| 13 | container->view->addChild(childView); |
| 14 | |
| 15 | auto singleTapSnapshot = addSingleTapGesture(childView); |
| 16 | |
| 17 | container->dispatchEvent(TouchEventTypeDown, 30, 35); |
| 18 | container->dispatchEvent(TouchEventTypeUp, 30, 35); |
| 19 | |
| 20 | ASSERT_EQ(GestureRecognizerStateEnded, singleTapSnapshot->state); |
| 21 | |
| 22 | ASSERT_TRUE(container->root->getTouchDispatcher().isEmpty()); |
| 23 | } |
| 24 | |
| 25 | TEST(SingleTapGestureRecognizer, canHandleSingleTapWithDoubleTap) { |
| 26 | auto container = makeContainer(0, 0, 100, 100); |
nothing calls this directly
no test coverage detected