From b6488683617cf6af4203cf57d66d846e9dfe321c Mon Sep 17 00:00:00 2001 From: nick black Date: Sat, 6 Jun 2020 01:58:55 -0400 Subject: [PATCH] PolyfillOnGlyph unit test fix --- tests/fills.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/fills.cpp b/tests/fills.cpp index 0e846ac60..909779c25 100644 --- a/tests/fills.cpp +++ b/tests/fills.cpp @@ -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)); }