| 289 | #undef ASSERT_RGBA |
| 290 | |
| 291 | TEST(Helpers, FlipY) |
| 292 | { |
| 293 | const uint32_t width = 8; |
| 294 | const uint32_t height = 8; |
| 295 | uint32_t image[width*height]; |
| 296 | |
| 297 | for (uint32_t y = 0; y < height; ++y) |
| 298 | { |
| 299 | for (uint32_t x = 0; x < width; ++x) |
| 300 | { |
| 301 | image[x + width * y] = x + width * (height - y - 1); |
| 302 | } |
| 303 | } |
| 304 | |
| 305 | dmTexc::FlipImageY_RGBA8888(image, width, height); |
| 306 | |
| 307 | for (uint32_t y = 0; y < height; ++y) |
| 308 | { |
| 309 | for (uint32_t x = 0; x < width; ++x) |
| 310 | { |
| 311 | ASSERT_EQ(x + width * y, image[x + width * y]); |
| 312 | } |
| 313 | } |
| 314 | |
| 315 | |
| 316 | int w = 7; |
| 317 | int h = 7; |
| 318 | |
| 319 | for (uint32_t y = 0; y < h; ++y) |
| 320 | { |
| 321 | for (uint32_t x = 0; x < w; ++x) |
| 322 | { |
| 323 | image[x + w * y] = x + w * (h - y - 1); |
| 324 | } |
| 325 | } |
| 326 | |
| 327 | dmTexc::FlipImageY_RGBA8888(image, w, h); |
| 328 | |
| 329 | for (uint32_t y = 0; y < h; ++y) |
| 330 | { |
| 331 | for (uint32_t x = 0; x < w; ++x) |
| 332 | { |
| 333 | ASSERT_EQ(x + w * y, image[x + w * y]); |
| 334 | } |
| 335 | } |
| 336 | |
| 337 | } |
| 338 | |
| 339 | TEST(Helpers, FlipX) |
| 340 | { |
nothing calls this directly
no test coverage detected