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

Function checkFile

test/unit/apps/TileTest.cpp:46–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44using namespace pdal;
45
46void checkFile(int i, int j, int lines, double xoff = 0, double yoff = 0)
47{
48 std::string header;
49 std::string t(Support::temppath("tile/out" +
50 std::to_string(i) + "_" + std::to_string(j) + ".txt"));
51 Utils::ClassicLocaleStream<std::ifstream> in(t);
52 std::getline(in, header);
53
54 int count = 0;
55 while (in)
56 {
57 char c;
58 double x, y, z;
59
60 in >> x >> c >> y >> c >> z;
61 if (!in.good()) break;
62 EXPECT_GE(x, xoff + (i * 10));
63 EXPECT_LT(x, xoff + ((i + 1) * 10));
64 EXPECT_GE(y, yoff + (j * 10));
65 EXPECT_LT(y, yoff + ((j + 1) * 10));
66 count++;
67 }
68 EXPECT_EQ(count, lines);
69}
70
71TEST(Tile, test1)
72{

Callers 1

TESTFunction · 0.85

Calls 1

temppathFunction · 0.85

Tested by

no test coverage detected