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

Function verifyTestView

test/unit/PointViewTest.cpp:73–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71
72
73void verifyTestView(const PointView& view, point_count_t cnt = 17)
74{
75 // read the view back out
76 for (PointId i = 0; i < cnt; i++)
77 {
78 uint8_t x = view.getFieldAs<uint8_t>(
79 Dimension::Id::Classification, i);
80 int32_t y = view.getFieldAs<uint32_t>(Dimension::Id::X, i);
81 double z = view.getFieldAs<double>(Dimension::Id::Y, i);
82
83 EXPECT_EQ(x, (uint8_t)(i + 1));
84 EXPECT_EQ(y, (int32_t)(i * 10));
85 EXPECT_TRUE(Utils::compare_approx(z, static_cast<double>(i) * 100.0,
86 (std::numeric_limits<double>::min)()));
87 }
88}
89
90TEST(PointViewTest, getSet)
91{

Callers 1

TESTFunction · 0.85

Calls 1

compare_approxFunction · 0.85

Tested by

no test coverage detected