From 4b016ce4d2229f91fed8f9717ac401a64c5b7290 Mon Sep 17 00:00:00 2001 From: nick black Date: Sat, 14 Nov 2020 17:03:55 -0500 Subject: [PATCH] notcurses unit tests: ncplane_new->ncplane_create #1115 --- tests/notcurses.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/tests/notcurses.cpp b/tests/notcurses.cpp index 20858613b..96361249b 100644 --- a/tests/notcurses.cpp +++ b/tests/notcurses.cpp @@ -71,8 +71,17 @@ TEST_CASE("NotcursesBase") { for(int y = 0 ; y < maxy ; ++y){ for(int x = 0 ; x < maxx ; ++x){ const auto idx = y * maxx + x; - planes[idx] = ncplane_new(notcurses_stdplane(nc_), 1, 1, y, x, - &planesecrets[idx], nullptr); + struct ncplane_options nopts = { + .y = y, + .horiz = { .x = x, }, + .rows = 1, + .cols = 1, + .userptr = &planesecrets[idx], + .name = nullptr, + .resizecb = nullptr, + .flags = 0, + }; + planes[idx] = ncplane_create(notcurses_stdplane(nc_), &nopts); REQUIRE(planes[idx]); } }