PolyfillOnGlyph unit test fix

This commit is contained in:
nick black 2020-06-06 01:58:55 -04:00
parent 633ef1f76c
commit b648868361
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

View File

@ -39,9 +39,13 @@ TEST_CASE("Fills") {
struct ncplane* pfn = ncplane_new(nc_, 4, 4, 0, 0, nullptr);
REQUIRE(nullptr != pfn);
CHECK(16 == ncplane_polyfill_yx(pfn, 0, 0, &c));
CHECK(0 == notcurses_render(nc_));
CHECK(0 < ncplane_putc_yx(pfn, 0, 0, &c));
// Trying to fill the origin ought now be rejected
CHECK(0 > ncplane_polyfill_yx(pfn, 0, 0, &c));
CHECK(0 < cell_load(pfn, &c, "/"));
CHECK(0 < ncplane_polyfill_yx(pfn, 0, 0, &c));
char* ncpc = ncplane_at_yx(pfn, 0, 0, NULL, NULL);
CHECK(0 == strcmp(ncpc, "/"));
free(ncpc);
CHECK(0 == notcurses_render(nc_));
CHECK(0 == ncplane_destroy(pfn));
}