unit test for quadblitter #667

This commit is contained in:
nick black 2020-06-14 02:38:35 -04:00 committed by Nick Black
parent d69d369304
commit d710bb24b2

View File

@ -227,8 +227,17 @@ TEST_CASE("Visual") {
vopts.flags = NCVISUAL_OPTION_NODEGRADE; vopts.flags = NCVISUAL_OPTION_NODEGRADE;
CHECK(n_ == ncvisual_render(nc_, ncv, &vopts)); CHECK(n_ == ncvisual_render(nc_, ncv, &vopts));
CHECK(0 == notcurses_render(nc_)); CHECK(0 == notcurses_render(nc_));
sleep(10); for(int y = 0 ; y < DIMY / 2 ; ++y){
// FIXME check output for(int x = 0 ; x < DIMX / 2 ; ++x){
uint32_t attrword;
uint64_t channels;
char* egc = notcurses_at_yx(nc_, y, x, &attrword, &channels);
REQUIRE(nullptr != egc);
CHECK((rgba[(y * 2 * DIMX) + (x * 2)] & 0xffffff) == channels_fg(channels));
CHECK((rgba[(y * 2 + 1) * DIMX + (x * 2) + 1] & 0xffffff) == channels_fg(channels));
free(egc);
}
}
delete[] rgba; delete[] rgba;
} }