MCPcopy Create free account
hub / github.com/PDAL/PDAL / TEST

Function TEST

test/unit/filters/GroupByFilterTest.cpp:43–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41using namespace pdal;
42
43TEST(GroupByTest, basic_test)
44{
45 Options ro;
46 ro.add("filename", Support::datapath("las/1.2-with-color.las"));
47 LasReader r;
48 r.setOptions(ro);
49
50 Options fo;
51 fo.add("dimension", "Classification");
52
53 GroupByFilter s;
54 s.setOptions(fo);
55 s.setInput(r);
56
57 PointTable table;
58 PointViewPtr view(new PointView(table));
59 s.prepare(table);
60 PointViewSet viewSet = s.execute(table);
61
62 EXPECT_EQ(2u, viewSet.size());
63
64 std::vector<PointViewPtr> views;
65 for (auto it = viewSet.begin(); it != viewSet.end(); ++it)
66 views.push_back(*it);
67
68 EXPECT_EQ(789u, views[0]->size());
69 EXPECT_EQ(276u, views[1]->size());
70}

Callers

nothing calls this directly

Calls 8

datapathFunction · 0.85
setOptionsMethod · 0.80
addMethod · 0.45
prepareMethod · 0.45
executeMethod · 0.45
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected