MCPcopy Create free account
hub / github.com/apache/arrow / ExpectForestIs

Function ExpectForestIs

cpp/src/arrow/dataset/subtree_test.cc:127–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

125}
126
127void ExpectForestIs(std::vector<FileInfo> infos, std::vector<PT> expected_roots) {
128 auto forest = MakeForest(&infos);
129
130 std::vector<PT> actual_roots;
131 ASSERT_OK(forest.Visit(
132 [&](Forest::Ref ref) -> Result<bool> {
133 actual_roots.emplace_back(ref, infos);
134 return false; // only visit roots
135 },
136 [](Forest::Ref) {}));
137
138 // visit expected and assert equality
139 EXPECT_THAT(actual_roots, ContainerEq(expected_roots));
140}
141
142TEST(Forest, Basic) {
143 ExpectForestIs({}, {});

Callers 1

TESTFunction · 0.85

Calls 3

MakeForestFunction · 0.85
emplace_backMethod · 0.80
VisitMethod · 0.45

Tested by

no test coverage detected