tests: apply clang modernizations

This commit is contained in:
nick black 2020-05-07 00:52:40 -04:00
parent a571f4daaa
commit ed548ab590
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC
2 changed files with 3 additions and 3 deletions

View File

@ -531,7 +531,7 @@ TEST_CASE("NCPlane") {
CHECK(0 == testcell.channels);
int dimy, dimx;
ncplane_dim_yx(n_, &dimy, &dimx);
REQUIRE(0 == ncplane_cursor_move_yx(n_, 1, dimx - mbstowcs(NULL, STR2, 0)));
REQUIRE(0 == ncplane_cursor_move_yx(n_, 1, dimx - mbstowcs(nullptr, STR2, 0)));
REQUIRE(0 < ncplane_putstr(n_, STR2));
int y, x;
ncplane_cursor_yx(n_, &y, &x);
@ -543,7 +543,7 @@ TEST_CASE("NCPlane") {
CHECK(!strcmp("Σ", cell_extended_gcluster(n_, &testcell)));
CHECK(0 == testcell.attrword);
CHECK(0 == testcell.channels);
REQUIRE(0 == ncplane_cursor_move_yx(n_, 1, dimx - mbstowcs(NULL, STR2, 0)));
REQUIRE(0 == ncplane_cursor_move_yx(n_, 1, dimx - mbstowcs(nullptr, STR2, 0)));
REQUIRE(0 < ncplane_at_cursor_cell(n_, &testcell)); // want first char of STR2
CHECK(!strcmp("α", cell_extended_gcluster(n_, &testcell)));
CHECK(0 == testcell.attrword);

View File

@ -1,7 +1,7 @@
#include "main.h"
#include <iostream>
int panelcb(struct nctablet* t, int begx, int begy, int maxx, int maxy, bool cliptop){
auto panelcb(struct nctablet* t, int begx, int begy, int maxx, int maxy, bool cliptop) -> int {
CHECK(nctablet_ncplane(t));
CHECK(begx < maxx);
CHECK(begy < maxy);