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

Function TEST

test/unit/io/FauxReaderTest.cpp:41–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39using namespace pdal;
40
41TEST(FauxReaderTest, test_constant_mode_sequential_iter)
42{
43 Options ops;
44
45 BOX3D bounds(1.0, 2.0, 3.0, 101.0, 102.0, 103.0);
46 ops.add("bounds", bounds);
47 ops.add("count", 750);
48 ops.add("mode", "constant");
49 std::shared_ptr<FauxReader> reader(new FauxReader);
50 reader->setOptions(ops);
51
52 PointTable table;
53 reader->prepare(table);
54 PointViewSet viewSet = reader->execute(table);
55 EXPECT_EQ(viewSet.size(), 1u);
56 PointViewPtr view = *viewSet.begin();
57 EXPECT_EQ(view->size(), 750u);
58 for (point_count_t i = 0; i < view->size(); i++)
59 {
60 double x = view->getFieldAs<double>(Dimension::Id::X, i);
61 double y = view->getFieldAs<double>(Dimension::Id::Y, i);
62 double z = view->getFieldAs<double>(Dimension::Id::Z, i);
63 uint64_t t = view->getFieldAs<uint64_t>(Dimension::Id::OffsetTime, i);
64
65 EXPECT_DOUBLE_EQ(x, 1.0);
66 EXPECT_DOUBLE_EQ(y, 2.0);
67 EXPECT_DOUBLE_EQ(z, 3.0);
68 EXPECT_EQ(t, i);
69 }
70}
71
72
73TEST(FauxReaderTest, test_random_mode)

Callers

nothing calls this directly

Calls 8

testGridFunction · 0.85
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