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

Function TEST

valdi/test/runtime/ViewNode_tests.cpp:20–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18 for (auto* child : *viewNode) {
19 assertAllFlagsAreUpToDate(child);
20 }
21}
22
23namespace {
24
25Ref<ViewNode> addSizedChild(ViewNodeTestsDependencies& utils, const Ref<ViewNode>& root) {
26 auto child = utils.createView();
27 utils.setViewNodeAttribute(child, "width", Value(50.0));
28 utils.setViewNodeAttribute(child, "height", Value(50.0));
29 root->appendChild(utils.getViewTransactionScope(), child);
30 root->performLayout(utils.getViewTransactionScope(), Size(100, 100), LayoutDirectionLTR);
31 root->updateVisibilityAndPerformUpdates(utils.getViewTransactionScope());
32 return child;
33}
34
35} // namespace
36
37TEST(ViewNode, countsViewPoolMissesHitsAndDrops) {
38 ViewNodeTestsDependencies utils;
39 // Must precede the first view factory creation, which captures the setting.
40 utils.getViewManager().setAllowViewPooling(true);
41 auto root = utils.createRootView();

Callers

nothing calls this directly

Calls 15

YGNodeGetChildCountFunction · 0.85
YGNodeGetChildFunction · 0.85
unwrapFunction · 0.85
YGNodeIsDirtyFunction · 0.85
assertVisibleInRangeFunction · 0.85
minFunction · 0.85
UpdateStepClass · 0.85
DummyViewClass · 0.85
createLayoutMethod · 0.80
insertChildAtMethod · 0.80
getYogaNodeMethod · 0.80

Tested by

no test coverage detected