From 7c365fcfd6ceb9887c49482f854fa461b6cc0a9e Mon Sep 17 00:00:00 2001 From: nick black Date: Sat, 23 Oct 2021 05:45:03 -0400 Subject: [PATCH] [blitters] unit test blitter->string lookup --- src/tests/blit.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/tests/blit.cpp b/src/tests/blit.cpp index ed4ce428b..4bf6124dc 100644 --- a/src/tests/blit.cpp +++ b/src/tests/blit.cpp @@ -8,6 +8,14 @@ TEST_CASE("Blit") { auto n_ = notcurses_stdplane(nc_); REQUIRE(n_); + SUBCASE("BlitterStrings") { + CHECK(0 == strcmp("pixel", notcurses_str_blitter(NCBLIT_PIXEL))); + CHECK(0 == strcmp("sex", notcurses_str_blitter(NCBLIT_3x2))); + CHECK(0 == strcmp("quad", notcurses_str_blitter(NCBLIT_2x2))); + CHECK(0 == strcmp("half", notcurses_str_blitter(NCBLIT_2x1))); + CHECK(0 == strcmp("ascii", notcurses_str_blitter(NCBLIT_1x1))); + } + SUBCASE("BgraToRgba") { const uint32_t data[8] = { // bgra (BE): RGBA bgra (LE): ABGR