MCPcopy Create free account
hub / github.com/Snapchat/Valdi / assertVisibleInRange

Function assertVisibleInRange

valdi/test/runtime/ViewNode_tests.cpp:2597–2609  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2595 scrollHorizontal->setScrollContentOffset(utils.getViewTransactionScope(), sHoriEnd);
2596 root->updateVisibilityAndPerformUpdates(utils.getViewTransactionScope());
2597
2598 ASSERT_EQ(true, root->canScroll(locationTop, ScrollDirectionTopToBottom));
2599 ASSERT_EQ(true, root->canScroll(locationTop, ScrollDirectionBottomToTop));
2600 ASSERT_EQ(false, root->canScroll(locationTop, ScrollDirectionLeftToRight));
2601 ASSERT_EQ(false, root->canScroll(locationTop, ScrollDirectionRightToLeft));
2602
2603 ASSERT_EQ(true, root->canScroll(locationCenter, ScrollDirectionTopToBottom));
2604 ASSERT_EQ(true, root->canScroll(locationCenter, ScrollDirectionBottomToTop));
2605 ASSERT_EQ(false, root->canScroll(locationCenter, ScrollDirectionLeftToRight));
2606 ASSERT_EQ(false, root->canScroll(locationCenter, ScrollDirectionRightToLeft));
2607
2608 ASSERT_EQ(true, root->canScroll(locationBottom, ScrollDirectionTopToBottom));
2609 ASSERT_EQ(true, root->canScroll(locationBottom, ScrollDirectionBottomToTop));
2610 ASSERT_EQ(false, root->canScroll(locationBottom, ScrollDirectionLeftToRight));
2611 ASSERT_EQ(false, root->canScroll(locationBottom, ScrollDirectionRightToLeft));
2612}

Callers 1

TESTFunction · 0.85

Calls 2

isVisibleInViewportMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected