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

Function parseNodePath

valdi/test/utils/valdi_test_utils.cpp:99–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97}
98
99Valdi::ViewNodePath parseNodePath(std::string_view nodePath) {
100 auto result = Valdi::ViewNodePath::parse(nodePath);
101 if (!result) {
102 throw Valdi::Exception(result.error().toStringBox());
103 }
104 return result.value();
105}
106
107Valdi::Ref<Valdi::ViewNode> getViewNodeForId(const Valdi::SharedViewNodeTree& viewNodeTree, std::string id) {
108 return viewNodeTree->getViewNodeForNodePath(parseNodePath(id));

Callers 3

TEST_PFunction · 0.85
TEST_PFunction · 0.85
getViewNodeForIdFunction · 0.85

Calls 5

errorMethod · 0.65
valueMethod · 0.65
parseFunction · 0.50
ExceptionClass · 0.50
toStringBoxMethod · 0.45

Tested by

no test coverage detected