| 38 | } |
| 39 | |
| 40 | void TestAngleColors(size_t width, size_t height, vector<uint8_t> const & frameBuffer, uint8_t expectedR, |
| 41 | uint8_t expectedG, uint8_t expectedB, uint8_t expectedA) |
| 42 | { |
| 43 | TEST_EQUAL(frameBuffer.size(), width * height * kAltitudeChartBPP, ()); |
| 44 | TEST(IsColor(frameBuffer, 0 /* startColorIdx */, expectedR, expectedG, expectedB, expectedA), ()); |
| 45 | TEST(IsColor(frameBuffer, kAltitudeChartBPP * (width - 1) /* startColorIdx */, expectedR, expectedG, expectedB, |
| 46 | expectedA), |
| 47 | ()); |
| 48 | TEST(IsColor(frameBuffer, kAltitudeChartBPP * height * (width - 1) /* startColorIdx */, expectedR, expectedG, |
| 49 | expectedB, expectedA), |
| 50 | ()); |
| 51 | TEST(IsColor(frameBuffer, kAltitudeChartBPP * height * width - kAltitudeChartBPP /* startColorIdx */, expectedR, |
| 52 | expectedG, expectedB, expectedA), |
| 53 | ()); |
| 54 | } |
| 55 | } // namespace |
| 56 | |
| 57 | UNIT_TEST(ScaleChartData_Test) |