mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-08 01:10:23 +00:00
[plane] free unit test leaks
This commit is contained in:
parent
9033f4fd98
commit
416f2eb6df
@ -107,7 +107,9 @@ TEST_CASE("Plane") {
|
||||
SUBCASE("EmitNULCell") {
|
||||
nccell c = CELL_CHAR_INITIALIZER('a');
|
||||
CHECK(0 < ncplane_putc_yx(n_, 0, 0, &c));
|
||||
CHECK(0 == strcmp("a", ncplane_at_yx(n_, 0, 0, nullptr, nullptr)));
|
||||
auto egc = ncplane_at_yx(n_, 0, 0, nullptr, nullptr);
|
||||
CHECK(0 == strcmp("a", egc));
|
||||
free(egc);
|
||||
unsigned y, x;
|
||||
ncplane_cursor_yx(n_, &y, &x);
|
||||
CHECK(0 == y);
|
||||
@ -115,7 +117,9 @@ TEST_CASE("Plane") {
|
||||
CHECK(0 == notcurses_render(nc_));
|
||||
c = CELL_TRIVIAL_INITIALIZER;
|
||||
CHECK(0 < ncplane_putc_yx(n_, 0, 0, &c));
|
||||
CHECK(0 == strcmp("", ncplane_at_yx(n_, 0, 0, nullptr, nullptr)));
|
||||
egc = ncplane_at_yx(n_, 0, 0, nullptr, nullptr);
|
||||
CHECK(0 == strcmp("", egc));
|
||||
free(egc);
|
||||
ncplane_cursor_yx(n_, &y, &x);
|
||||
CHECK(0 == y);
|
||||
CHECK(1 == x);
|
||||
|
Loading…
Reference in New Issue
Block a user