mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-09 17:19:03 -04:00
adapt test to new ncplane_putc() api
This commit is contained in:
parent
0ae550f5d1
commit
879009ff9a
@ -17,7 +17,6 @@ class CellTest : public :: testing::Test {
|
||||
|
||||
void TearDown() override {
|
||||
if(nc_){
|
||||
EXPECT_EQ(0, ncplane_fg_rgb8(n_, 255, 255, 255));
|
||||
EXPECT_EQ(0, notcurses_render(nc_));
|
||||
EXPECT_EQ(0, notcurses_stop(nc_));
|
||||
}
|
||||
@ -31,11 +30,12 @@ TEST_F(CellTest, SetStyles) {
|
||||
cell c;
|
||||
memset(&c, 0, sizeof(c));
|
||||
cell_set_style(&c, WA_ITALIC);
|
||||
cell_load(n_, &c, "s");
|
||||
EXPECT_EQ(1, ncplane_putc(n_, &c, "s"));
|
||||
ASSERT_EQ(1, cell_load(n_, &c, "s"));
|
||||
EXPECT_EQ(0, ncplane_fg_rgb8(n_, 255, 255, 255));
|
||||
EXPECT_EQ(1, ncplane_putc(n_, &c));
|
||||
int x, y;
|
||||
ncplane_cursor_yx(n_, &y, &x);
|
||||
EXPECT_EQ(1, x);
|
||||
EXPECT_EQ(0, y);
|
||||
notcurses_render(nc_);
|
||||
EXPECT_EQ(0, notcurses_render(nc_));
|
||||
}
|
||||
|
@ -103,9 +103,9 @@ TEST_F(NcplaneTest, RejectBadRGB) {
|
||||
// Verify we can emit a wide character, and it advances the cursor
|
||||
TEST_F(NcplaneTest, EmitWchar) {
|
||||
const char cchar[] = "✔";
|
||||
cell c;
|
||||
cell c{};
|
||||
cell_load(n_, &c, cchar);
|
||||
EXPECT_EQ(strlen(cchar), ncplane_putc(n_, &c, cchar));
|
||||
EXPECT_EQ(strlen(cchar), ncplane_putc(n_, &c));
|
||||
int x, y;
|
||||
ncplane_cursor_yx(n_, &y, &x);
|
||||
EXPECT_EQ(0, y);
|
||||
|
Loading…
x
Reference in New Issue
Block a user