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

Function exec5

test/unit/WhereTest.cpp:231–265  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

229}
230
231void exec5(const std::string& where, size_t expKeep)
232{
233 StageFactory factory;
234
235 Stage *r = factory.createStage("readers.faux");
236 Options ro;
237 ro.add("count", 100u);
238 ro.add("bounds", BOX3D(0, 0, 100, 99, 9.9, 199));
239 ro.add("mode", "ramp");
240 r->setOptions(ro);
241
242 class TestWriter : public NoFilenameWriter, public Streamable
243 {
244 std::string getName() const
245 { return "writers.test"; }
246
247 bool processOne(PointRef& p)
248 {
249 g_count++;
250 return true;
251 }
252 };
253
254 TestWriter w;
255 Options wo;
256 wo.add("where", where);
257 w.setOptions(wo);
258 w.setInput(*r);
259
260 g_count = 0;
261 FixedPointTable t(1000);
262 w.prepare(t);
263 w.execute(t);
264 EXPECT_EQ(g_count, expKeep);
265}
266
267// Support for filter that returns no point views.
268void exec6(const std::string& where, size_t expKeep, size_t expViews,

Callers 1

TESTFunction · 0.85

Calls 6

createStageMethod · 0.80
setOptionsMethod · 0.80
BOX3DClass · 0.70
addMethod · 0.45
prepareMethod · 0.45
executeMethod · 0.45

Tested by

no test coverage detected