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

Function test_a_format

test/unit/io/LasReaderTest.cpp:199–224  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

197
198
199static void test_a_format(const std::string& file, uint8_t majorVersion,
200 uint8_t minorVersion, int pointFormat,
201 double xref, double yref, double zref, double tref,
202 uint16_t rref, uint16_t gref, uint16_t bref)
203{
204 PointTable table;
205
206 Options ops1;
207 ops1.add("filename", Support::datapath(file));
208 ops1.add("count", 1);
209 LasReader reader;
210 reader.setOptions(ops1);
211 reader.prepare(table);
212
213 const LasHeader& h = reader.header();
214 EXPECT_EQ(h.pointFormat(), pointFormat);
215 EXPECT_EQ(h.versionMajor(), majorVersion);
216 EXPECT_EQ(h.versionMinor(), minorVersion);
217
218 PointViewSet viewSet = reader.execute(table);
219 EXPECT_EQ(viewSet.size(), 1u);
220 PointViewPtr view = *viewSet.begin();
221 EXPECT_EQ(view->size(), 1u);
222
223 Support::check_pN(*view, 0, xref, yref, zref, tref, rref, gref, bref);
224}
225
226TEST(LasReaderTest, test_different_formats)
227{

Callers 1

TESTFunction · 0.85

Calls 11

datapathFunction · 0.85
setOptionsMethod · 0.80
check_pNFunction · 0.50
addMethod · 0.45
prepareMethod · 0.45
pointFormatMethod · 0.45
versionMajorMethod · 0.45
versionMinorMethod · 0.45
executeMethod · 0.45
sizeMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected