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

Function TEST

test/unit/filters/RandomizeFilterTest.cpp:43–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41using namespace pdal;
42
43TEST(RandomizeFilterTest, simple)
44{
45 // This isn't a real test. It's just here to allow easy debugging.
46
47 point_count_t count = 1000;
48
49 Options readerOps;
50 readerOps.add("bounds",
51 BOX3D(1, 1, 1, (double)count, (double)count, (double)count));
52 readerOps.add("mode", "ramp");
53 readerOps.add("count", count);
54
55 FauxReader r;
56 r.setOptions(readerOps);
57
58 RandomizeFilter f;
59 f.setInput(r);
60
61 PointTable t;
62 f.prepare(t);
63 PointViewSet s = f.execute(t);
64
65 EXPECT_EQ(s.size(), 1u);
66 PointViewPtr v = *s.begin();
67 EXPECT_EQ(v->size(), (size_t)count);
68
69 /**
70 for (PointId i = 0; i < count; i++)
71 std::cerr << "X[" << i << "] = " <<
72 v->getFieldAs<double>(Dimension::Id::X, i) << "!\n";
73 **/
74}
75
76TEST(RandomizeFilterTest, seedZero)
77{

Callers

nothing calls this directly

Calls 7

setOptionsMethod · 0.80
BOX3DClass · 0.50
addMethod · 0.45
prepareMethod · 0.45
executeMethod · 0.45
sizeMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected