From 4731e8269f1eadae38e28041768e59082b84444d Mon Sep 17 00:00:00 2001 From: nick black Date: Thu, 10 Jun 2021 16:48:59 -0400 Subject: [PATCH] add a unit test for ncdirect boxen #1752 --- src/tests/direct.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/tests/direct.cpp b/src/tests/direct.cpp index a2c27fb6e..e53c859d1 100644 --- a/src/tests/direct.cpp +++ b/src/tests/direct.cpp @@ -1,7 +1,7 @@ #include "main.h" #include -TEST_CASE("DirectMode") { +TEST_CASE("Direct") { struct ncdirect* nc_ = ncdirect_init(NULL, stdout, 0); if(!nc_){ return; @@ -53,6 +53,14 @@ TEST_CASE("DirectMode") { } } + SUBCASE("BoxDefault") { + uint64_t chans = CHANNELS_RGB_INITIALIZER(255, 0, 255, 0, 0, 0); + ncchannels_set_bg_default(&chans); + ncdirect_set_bg_rgb8(nc_, 0x88, 0x88, 0x88); + printf("test background\n"); + CHECK(0 == ncdirect_rounded_box(nc_, chans, chans, chans, chans, 8, 8, 0)); + } + #ifndef NOTCURSES_USE_MULTIMEDIA SUBCASE("VisualDisabled"){ CHECK(!ncdirect_canopen_images(nc_));