convert ncplane_new() to ncplane_create() in blit tests

This commit is contained in:
nick black 2020-11-14 14:26:36 -05:00 committed by Nick Black
parent b8dc9544cf
commit 55ac9cc231
2 changed files with 29 additions and 2 deletions

View File

@ -425,7 +425,10 @@ auto ncvisual_render(notcurses* nc, ncvisual* ncv,
},
.rows = disprows / encoding_y_scale(bset),
.cols = dispcols / encoding_x_scale(bset),
.userptr = nullptr,
.name = "vis",
.resizecb = nullptr,
.flags = 0,
};
if((n = ncplane_create(notcurses_stdplane(nc), &nopts)) == nullptr){
return nullptr;

View File

@ -14,7 +14,19 @@ TEST_CASE("Blitting") {
0xffffffff, 0xff0088ff, 0xffff8800, 0xff88ff00,
0xffff0088, 0xff8800ff, 0Xff00ff88, 0xff000000,
};
auto ncp = ncplane_new(n_, 2, 4, 0, 0, nullptr, nullptr);
struct ncplane_options nopts = {
.y = 0,
.horiz = {
.x = 0,
},
.rows = 2,
.cols = 4,
.userptr = nullptr,
.name = nullptr,
.resizecb = nullptr,
.flags = 0,
};
auto ncp = ncplane_create(n_, &nopts);
REQUIRE(nullptr != ncp);
struct ncvisual_options vopts = {
.n = ncp,
@ -52,7 +64,19 @@ TEST_CASE("Blitting") {
0xffffffff, 0xff0088ff, 0xffff8800, 0xff88ff00, 0x00000000,
0xffff0088, 0xff8800ff, 0xff00ff88, 0xff000000, 0x00000000,
};
auto ncp = ncplane_new(n_, 2, 4, 0, 0, nullptr, nullptr);
struct ncplane_options nopts = {
.y = 0,
.horiz = {
.x = 0,
},
.rows = 2,
.cols = 4,
.userptr = nullptr,
.name = nullptr,
.resizecb = nullptr,
.flags = 0,
};
auto ncp = ncplane_create(n_, &nopts);
REQUIRE(nullptr != ncp);
struct ncvisual_options vopts = {
.n = ncp,