[stacking] guard tests for quadrants

pull/1520/head
nick black 4 years ago
parent 1720457467
commit 1f67f540e6
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -111,6 +111,7 @@ TEST_CASE("Blitting") {
// original version https://github.com/dankamongmen/notcurses/issues/1354 // original version https://github.com/dankamongmen/notcurses/issues/1354
SUBCASE("QuadblitterMax") { SUBCASE("QuadblitterMax") {
if(notcurses_canutf8(nc_)){ if(notcurses_canutf8(nc_)){
if(nc_->tcache.quadrants){
uint32_t p2x2[4]; uint32_t p2x2[4];
uint32_t* ptl = &p2x2[0]; uint32_t* ptl = &p2x2[0];
ncpixel_set_a(ptl, 0xff); ncpixel_set_a(ptl, 0xff);
@ -154,6 +155,7 @@ TEST_CASE("Blitting") {
free(egc); free(egc);
} }
} }
}
CHECK(!notcurses_stop(nc_)); CHECK(!notcurses_stop(nc_));
} }

@ -102,6 +102,7 @@ TEST_CASE("Stacking") {
} }
SUBCASE("StackedQuadHalves") { SUBCASE("StackedQuadHalves") {
if(nc_->tcache.quadrants){
struct ncplane_options opts = { struct ncplane_options opts = {
0, 0, 1, 1, nullptr, "top", nullptr, 0, 0, 0, 0, 0, 1, 1, nullptr, "top", nullptr, 0, 0, 0,
}; };
@ -137,8 +138,10 @@ TEST_CASE("Stacking") {
CHECK(0x00ff00 == channels_bg_rgb(channels)); CHECK(0x00ff00 == channels_bg_rgb(channels));
ncplane_destroy(top); ncplane_destroy(top);
} }
}
SUBCASE("StackedQuadCrossed") { SUBCASE("StackedQuadCrossed") {
if(nc_->tcache.quadrants){
ncplane_erase(n_); ncplane_erase(n_);
notcurses_refresh(nc_, nullptr, nullptr); notcurses_refresh(nc_, nullptr, nullptr);
struct ncplane_options opts = { struct ncplane_options opts = {
@ -176,6 +179,7 @@ TEST_CASE("Stacking") {
CHECK(0xffffff == channels_bg_rgb(channels)); CHECK(0xffffff == channels_bg_rgb(channels));
ncplane_destroy(top); ncplane_destroy(top);
} }
}
// common teardown // common teardown
CHECK(0 == notcurses_stop(nc_)); CHECK(0 == notcurses_stop(nc_));

Loading…
Cancel
Save