MCPcopy Create free account
hub / github.com/OSGeo/gdal / Check

Function Check

autotest/cpp/testblockcache.cpp:97–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95}
96
97static void Check(GByte *pBuffer, int nXSize, int nYSize, int nBands, int nXOff,
98 int nYOff, int nXWin, int nYWin)
99{
100 for (int iBand = 0; iBand < nBands; iBand++)
101 {
102 for (int iY = 0; iY < nYWin; iY++)
103 {
104 for (int iX = 0; iX < nXWin; iX++)
105 {
106 unsigned long seed = iBand * nXSize * nYSize +
107 (iY + nYOff) * nXSize + iX + nXOff;
108 GByte expected = (GByte)(myrand_r(&seed) & 0xff);
109 EXPECT_EQ(pBuffer[iBand * nXWin * nYWin + iY * nXWin + iX],
110 expected);
111 }
112 }
113 }
114}
115
116static void ReadRaster(GDALDataset *poDS, int nXSize, int nYSize, int nBands,
117 GByte *pBuffer, int nXOff, int nYOff, int nXWin,

Callers 1

ReadRasterFunction · 0.70

Calls 1

myrand_rFunction · 0.85

Tested by

no test coverage detected