[blitters] unit test blitter->string lookup

This commit is contained in:
nick black 2021-10-23 05:45:03 -04:00
parent c188382f03
commit 7c365fcfd6
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

View File

@ -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