2020-02-05 22:29:42 +00:00
|
|
|
#include "main.h"
|
|
|
|
#include <iostream>
|
|
|
|
|
2020-08-28 16:10:14 +00:00
|
|
|
auto ncreel_validate(const ncreel* n) -> bool {
|
2020-08-09 21:40:59 +00:00
|
|
|
if(n->tablets == NULL){
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
const nctablet* t = n->tablets;
|
|
|
|
int cury = -1;
|
|
|
|
bool wentaround = false;
|
|
|
|
do{
|
|
|
|
const ncplane* np = t->p;
|
|
|
|
if(np){
|
|
|
|
int y, x;
|
|
|
|
ncplane_yx(np, &y, &x);
|
|
|
|
//fprintf(stderr, "forvart: %p (%p) @ %d\n", t, np, y);
|
2020-08-10 02:14:56 +00:00
|
|
|
if(y < cury + 1){
|
2020-08-09 21:40:59 +00:00
|
|
|
if(wentaround){
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
wentaround = true;
|
|
|
|
}else if(y == cury){
|
|
|
|
return false;
|
|
|
|
}
|
2020-08-10 02:14:56 +00:00
|
|
|
int ylen, xlen;
|
|
|
|
ncplane_dim_yx(np, &ylen, &xlen);
|
|
|
|
cury = y + ylen - 1;
|
2020-08-09 21:40:59 +00:00
|
|
|
}
|
|
|
|
}while((t = t->next) != n->tablets);
|
|
|
|
cury = INT_MAX;
|
|
|
|
wentaround = false;
|
|
|
|
do{
|
|
|
|
const ncplane* np = t->p;
|
|
|
|
if(np){
|
2020-08-10 02:14:56 +00:00
|
|
|
int y, x, ylen, xlen;
|
2020-08-09 21:40:59 +00:00
|
|
|
ncplane_yx(np, &y, &x);
|
2020-08-10 02:14:56 +00:00
|
|
|
ncplane_dim_yx(np, &ylen, &xlen);
|
2020-08-09 21:40:59 +00:00
|
|
|
//fprintf(stderr, "backwards: %p (%p) @ %d\n", t, np, y);
|
2020-08-10 02:14:56 +00:00
|
|
|
if(y + ylen - 1 > cury - 1){
|
2020-08-09 21:40:59 +00:00
|
|
|
if(wentaround){
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
wentaround = true;
|
|
|
|
}else if(y == cury){
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
cury = y;
|
|
|
|
}
|
|
|
|
}while((t = t->prev) != n->tablets);
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2020-09-28 09:40:31 +00:00
|
|
|
auto panelcb(nctablet* t, bool toptobottom) -> int {
|
2020-09-27 20:46:39 +00:00
|
|
|
CHECK(nctablet_plane(t));
|
2020-08-28 16:10:14 +00:00
|
|
|
CHECK(!nctablet_userptr(t));
|
|
|
|
CHECK(toptobottom);
|
|
|
|
// FIXME verify geometry is as expected
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2020-09-28 09:40:31 +00:00
|
|
|
auto cbfxn(nctablet* t, bool toptobottom) -> int {
|
2020-08-28 16:10:14 +00:00
|
|
|
(void)toptobottom;
|
|
|
|
int* userptr = static_cast<int*>(nctablet_userptr(t));
|
|
|
|
++*userptr;
|
|
|
|
return 4;
|
|
|
|
}
|
|
|
|
|
2020-09-28 09:40:31 +00:00
|
|
|
int check_allborders(nctablet* t, bool drawfromtop) {
|
|
|
|
(void)drawfromtop;
|
|
|
|
auto ncp = nctablet_plane(t);
|
|
|
|
REQUIRE(ncp);
|
|
|
|
int rows, cols;
|
|
|
|
ncplane_dim_yx(ncp, &rows, &cols);
|
|
|
|
int srows, scols;
|
|
|
|
ncplane_dim_yx(notcurses_stdplane(ncplane_notcurses(ncp)), &srows, &scols);
|
2020-10-05 21:33:11 +00:00
|
|
|
CHECK(srows == rows + 4);
|
2020-09-28 09:40:31 +00:00
|
|
|
CHECK(scols == cols + 4);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
int check_noborders(nctablet* t, bool drawfromtop) {
|
|
|
|
(void)drawfromtop;
|
|
|
|
auto ncp = nctablet_plane(t);
|
|
|
|
REQUIRE(ncp);
|
|
|
|
int rows, cols;
|
|
|
|
ncplane_dim_yx(ncp, &rows, &cols);
|
|
|
|
int srows, scols;
|
|
|
|
ncplane_dim_yx(notcurses_stdplane(ncplane_notcurses(ncp)), &srows, &scols);
|
|
|
|
CHECK(srows == rows);
|
|
|
|
CHECK(scols == cols);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
int check_notborders(nctablet* t, bool drawfromtop) {
|
|
|
|
(void)drawfromtop;
|
|
|
|
auto ncp = nctablet_plane(t);
|
|
|
|
REQUIRE(ncp);
|
|
|
|
int rows, cols;
|
|
|
|
ncplane_dim_yx(ncp, &rows, &cols);
|
|
|
|
int srows, scols;
|
|
|
|
ncplane_dim_yx(notcurses_stdplane(ncplane_notcurses(ncp)), &srows, &scols);
|
2020-10-05 21:33:11 +00:00
|
|
|
CHECK(srows == rows + 2); // we get maximum possible size to try out
|
2020-09-28 09:40:31 +00:00
|
|
|
CHECK(scols == cols + 2);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
int check_norborders(nctablet* t, bool drawfromtop) {
|
|
|
|
(void)drawfromtop;
|
|
|
|
auto ncp = nctablet_plane(t);
|
|
|
|
REQUIRE(ncp);
|
|
|
|
int rows, cols;
|
|
|
|
ncplane_dim_yx(ncp, &rows, &cols);
|
|
|
|
int srows, scols;
|
|
|
|
ncplane_dim_yx(notcurses_stdplane(ncplane_notcurses(ncp)), &srows, &scols);
|
|
|
|
CHECK(srows == rows + 2);
|
|
|
|
CHECK(scols == cols + 2);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
2020-05-07 19:06:07 +00:00
|
|
|
TEST_CASE("Reels") {
|
2020-06-16 03:58:43 +00:00
|
|
|
auto nc_ = testing_notcurses();
|
2020-05-17 11:57:21 +00:00
|
|
|
if(!nc_){
|
|
|
|
return;
|
|
|
|
}
|
2020-02-05 22:29:42 +00:00
|
|
|
struct ncplane* n_ = notcurses_stdplane(nc_);
|
|
|
|
REQUIRE(n_);
|
|
|
|
REQUIRE(0 == ncplane_cursor_move_yx(n_, 0, 0));
|
|
|
|
|
|
|
|
SUBCASE("InitLinear") {
|
|
|
|
ncreel_options r = { };
|
Tons of work on ncreel (#776)
Tons of work on ncreel (#627, #749, #694)
Improve reel demo: get input wired up once more, avoid the FPS demo at bottom, print pointer and line count in each tablet, use new ncreel API. Improve notcurses-ncreel explorer: kill memory leaks (#694), draw tablets better, use new ncreel API. Fix bug in ncreel core where cruft could be left on the screen, via a very gross brute force algorithm. I'll likely come back and make this a bit less ghastly in the future #749. Remove weird one-off input system from ncreel, residue from outcurses. Make some of the normalizing changes speced out in #627
* ncreel: give each tablet an index, and print it #749
* reel: eliminate FIXME + param to insert_tabler() #749
* ncreel: label tablets with their adress to correlate against debugging logs #749
* more terminal environment variable notes
* TERMS.md: add Sakura, st
* ncreel: move legend out of reel proper
* ncreel_options: dump min/max_supported_rows/cols #627
* ncreel: remove weird one-off input layer #627
* ncreel: add ncreel_offer_input()
* reel demo: call demo_getc()
* reel demo: rig up input to demo main
* ncreel: drop ncreel_del_focused(), properly bind tablets
* reel demo: don't free up necessary plane
* ncreel: don't pull absolute locations of tablets
* ncreel: place tablets correctly in boundrel
* reel demo: add back support for left/right
* reel demo: restore thread movement
* ncreel: remove a great deal of complexity
* reel demo: stay out of FPS graph's way
* ncreel: give each tablet an index, and print it #749
* reel: eliminate FIXME + param to insert_tabler() #749
* ncreel: label tablets with their adress to correlate against debugging logs #749
* ncreel: move legend out of reel proper
* ncreel_options: dump min/max_supported_rows/cols #627
* ncreel: remove weird one-off input layer #627
* ncreel: add ncreel_offer_input()
* reel demo: call demo_getc()
* reel demo: rig up input to demo main
* ncreel: drop ncreel_del_focused(), properly bind tablets
* reel demo: don't free up necessary plane
* ncreel: don't pull absolute locations of tablets
* ncreel: place tablets correctly in boundrel
* reel demo: add back support for left/right
* reel demo: restore thread movement
* ncreel: remove a great deal of complexity
* reel demo: stay out of FPS graph's way
* reel: tighten up reel following redraw
* reel: fix upper-left corner of topless perimeter
* ncreel: print linecount, return clipped value
* reel: draw focused tablet relative to reel
* reel: brute force decruftification, how embarrassing #749
2020-07-09 06:02:23 +00:00
|
|
|
struct ncreel* nr = ncreel_create(n_, &r);
|
2020-02-05 22:29:42 +00:00
|
|
|
REQUIRE(nr);
|
2020-08-16 10:52:45 +00:00
|
|
|
CHECK(0 == notcurses_render(nc_));
|
2020-09-27 19:57:03 +00:00
|
|
|
ncreel_destroy(nr);
|
2020-02-05 22:29:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
SUBCASE("InitLinearInfinite") {
|
|
|
|
ncreel_options r{};
|
2020-05-29 18:53:53 +00:00
|
|
|
r.flags = NCREEL_OPTION_INFINITESCROLL;
|
Tons of work on ncreel (#776)
Tons of work on ncreel (#627, #749, #694)
Improve reel demo: get input wired up once more, avoid the FPS demo at bottom, print pointer and line count in each tablet, use new ncreel API. Improve notcurses-ncreel explorer: kill memory leaks (#694), draw tablets better, use new ncreel API. Fix bug in ncreel core where cruft could be left on the screen, via a very gross brute force algorithm. I'll likely come back and make this a bit less ghastly in the future #749. Remove weird one-off input system from ncreel, residue from outcurses. Make some of the normalizing changes speced out in #627
* ncreel: give each tablet an index, and print it #749
* reel: eliminate FIXME + param to insert_tabler() #749
* ncreel: label tablets with their adress to correlate against debugging logs #749
* more terminal environment variable notes
* TERMS.md: add Sakura, st
* ncreel: move legend out of reel proper
* ncreel_options: dump min/max_supported_rows/cols #627
* ncreel: remove weird one-off input layer #627
* ncreel: add ncreel_offer_input()
* reel demo: call demo_getc()
* reel demo: rig up input to demo main
* ncreel: drop ncreel_del_focused(), properly bind tablets
* reel demo: don't free up necessary plane
* ncreel: don't pull absolute locations of tablets
* ncreel: place tablets correctly in boundrel
* reel demo: add back support for left/right
* reel demo: restore thread movement
* ncreel: remove a great deal of complexity
* reel demo: stay out of FPS graph's way
* ncreel: give each tablet an index, and print it #749
* reel: eliminate FIXME + param to insert_tabler() #749
* ncreel: label tablets with their adress to correlate against debugging logs #749
* ncreel: move legend out of reel proper
* ncreel_options: dump min/max_supported_rows/cols #627
* ncreel: remove weird one-off input layer #627
* ncreel: add ncreel_offer_input()
* reel demo: call demo_getc()
* reel demo: rig up input to demo main
* ncreel: drop ncreel_del_focused(), properly bind tablets
* reel demo: don't free up necessary plane
* ncreel: don't pull absolute locations of tablets
* ncreel: place tablets correctly in boundrel
* reel demo: add back support for left/right
* reel demo: restore thread movement
* ncreel: remove a great deal of complexity
* reel demo: stay out of FPS graph's way
* reel: tighten up reel following redraw
* reel: fix upper-left corner of topless perimeter
* ncreel: print linecount, return clipped value
* reel: draw focused tablet relative to reel
* reel: brute force decruftification, how embarrassing #749
2020-07-09 06:02:23 +00:00
|
|
|
struct ncreel* nr = ncreel_create(n_, &r);
|
2020-02-05 22:29:42 +00:00
|
|
|
REQUIRE(nr);
|
2020-08-16 10:52:45 +00:00
|
|
|
CHECK(0 == notcurses_render(nc_));
|
2020-09-27 19:57:03 +00:00
|
|
|
ncreel_destroy(nr);
|
2020-02-05 22:29:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
SUBCASE("InitCircular") {
|
|
|
|
ncreel_options r{};
|
2020-05-29 18:53:53 +00:00
|
|
|
r.flags = NCREEL_OPTION_INFINITESCROLL | NCREEL_OPTION_CIRCULAR;
|
Tons of work on ncreel (#776)
Tons of work on ncreel (#627, #749, #694)
Improve reel demo: get input wired up once more, avoid the FPS demo at bottom, print pointer and line count in each tablet, use new ncreel API. Improve notcurses-ncreel explorer: kill memory leaks (#694), draw tablets better, use new ncreel API. Fix bug in ncreel core where cruft could be left on the screen, via a very gross brute force algorithm. I'll likely come back and make this a bit less ghastly in the future #749. Remove weird one-off input system from ncreel, residue from outcurses. Make some of the normalizing changes speced out in #627
* ncreel: give each tablet an index, and print it #749
* reel: eliminate FIXME + param to insert_tabler() #749
* ncreel: label tablets with their adress to correlate against debugging logs #749
* more terminal environment variable notes
* TERMS.md: add Sakura, st
* ncreel: move legend out of reel proper
* ncreel_options: dump min/max_supported_rows/cols #627
* ncreel: remove weird one-off input layer #627
* ncreel: add ncreel_offer_input()
* reel demo: call demo_getc()
* reel demo: rig up input to demo main
* ncreel: drop ncreel_del_focused(), properly bind tablets
* reel demo: don't free up necessary plane
* ncreel: don't pull absolute locations of tablets
* ncreel: place tablets correctly in boundrel
* reel demo: add back support for left/right
* reel demo: restore thread movement
* ncreel: remove a great deal of complexity
* reel demo: stay out of FPS graph's way
* ncreel: give each tablet an index, and print it #749
* reel: eliminate FIXME + param to insert_tabler() #749
* ncreel: label tablets with their adress to correlate against debugging logs #749
* ncreel: move legend out of reel proper
* ncreel_options: dump min/max_supported_rows/cols #627
* ncreel: remove weird one-off input layer #627
* ncreel: add ncreel_offer_input()
* reel demo: call demo_getc()
* reel demo: rig up input to demo main
* ncreel: drop ncreel_del_focused(), properly bind tablets
* reel demo: don't free up necessary plane
* ncreel: don't pull absolute locations of tablets
* ncreel: place tablets correctly in boundrel
* reel demo: add back support for left/right
* reel demo: restore thread movement
* ncreel: remove a great deal of complexity
* reel demo: stay out of FPS graph's way
* reel: tighten up reel following redraw
* reel: fix upper-left corner of topless perimeter
* ncreel: print linecount, return clipped value
* reel: draw focused tablet relative to reel
* reel: brute force decruftification, how embarrassing #749
2020-07-09 06:02:23 +00:00
|
|
|
struct ncreel* nr = ncreel_create(n_, &r);
|
2020-02-05 22:29:42 +00:00
|
|
|
REQUIRE(nr);
|
2020-08-09 21:40:59 +00:00
|
|
|
CHECK(ncreel_validate(nr));
|
2020-08-16 10:52:45 +00:00
|
|
|
CHECK(0 == notcurses_render(nc_));
|
2020-09-27 19:57:03 +00:00
|
|
|
ncreel_destroy(nr);
|
2020-02-05 22:29:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// circular is not allowed to be true when infinitescroll is false
|
|
|
|
SUBCASE("FiniteCircleRejected") {
|
|
|
|
ncreel_options r{};
|
2020-05-29 18:53:53 +00:00
|
|
|
r.flags = NCREEL_OPTION_CIRCULAR;
|
Tons of work on ncreel (#776)
Tons of work on ncreel (#627, #749, #694)
Improve reel demo: get input wired up once more, avoid the FPS demo at bottom, print pointer and line count in each tablet, use new ncreel API. Improve notcurses-ncreel explorer: kill memory leaks (#694), draw tablets better, use new ncreel API. Fix bug in ncreel core where cruft could be left on the screen, via a very gross brute force algorithm. I'll likely come back and make this a bit less ghastly in the future #749. Remove weird one-off input system from ncreel, residue from outcurses. Make some of the normalizing changes speced out in #627
* ncreel: give each tablet an index, and print it #749
* reel: eliminate FIXME + param to insert_tabler() #749
* ncreel: label tablets with their adress to correlate against debugging logs #749
* more terminal environment variable notes
* TERMS.md: add Sakura, st
* ncreel: move legend out of reel proper
* ncreel_options: dump min/max_supported_rows/cols #627
* ncreel: remove weird one-off input layer #627
* ncreel: add ncreel_offer_input()
* reel demo: call demo_getc()
* reel demo: rig up input to demo main
* ncreel: drop ncreel_del_focused(), properly bind tablets
* reel demo: don't free up necessary plane
* ncreel: don't pull absolute locations of tablets
* ncreel: place tablets correctly in boundrel
* reel demo: add back support for left/right
* reel demo: restore thread movement
* ncreel: remove a great deal of complexity
* reel demo: stay out of FPS graph's way
* ncreel: give each tablet an index, and print it #749
* reel: eliminate FIXME + param to insert_tabler() #749
* ncreel: label tablets with their adress to correlate against debugging logs #749
* ncreel: move legend out of reel proper
* ncreel_options: dump min/max_supported_rows/cols #627
* ncreel: remove weird one-off input layer #627
* ncreel: add ncreel_offer_input()
* reel demo: call demo_getc()
* reel demo: rig up input to demo main
* ncreel: drop ncreel_del_focused(), properly bind tablets
* reel demo: don't free up necessary plane
* ncreel: don't pull absolute locations of tablets
* ncreel: place tablets correctly in boundrel
* reel demo: add back support for left/right
* reel demo: restore thread movement
* ncreel: remove a great deal of complexity
* reel demo: stay out of FPS graph's way
* reel: tighten up reel following redraw
* reel: fix upper-left corner of topless perimeter
* ncreel: print linecount, return clipped value
* reel: draw focused tablet relative to reel
* reel: brute force decruftification, how embarrassing #749
2020-07-09 06:02:23 +00:00
|
|
|
struct ncreel* nr = ncreel_create(n_, &r);
|
2020-02-05 22:29:42 +00:00
|
|
|
REQUIRE(!nr);
|
2020-08-16 10:52:45 +00:00
|
|
|
CHECK(0 == notcurses_render(nc_));
|
2020-09-27 19:57:03 +00:00
|
|
|
ncreel_destroy(nr);
|
2020-02-05 22:29:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// We ought be able to invoke ncreel_next() and ncreel_prev() safely,
|
|
|
|
// even if there are no tablets. They both ought return nullptr.
|
|
|
|
SUBCASE("MovementWithoutTablets") {
|
|
|
|
ncreel_options r{};
|
Tons of work on ncreel (#776)
Tons of work on ncreel (#627, #749, #694)
Improve reel demo: get input wired up once more, avoid the FPS demo at bottom, print pointer and line count in each tablet, use new ncreel API. Improve notcurses-ncreel explorer: kill memory leaks (#694), draw tablets better, use new ncreel API. Fix bug in ncreel core where cruft could be left on the screen, via a very gross brute force algorithm. I'll likely come back and make this a bit less ghastly in the future #749. Remove weird one-off input system from ncreel, residue from outcurses. Make some of the normalizing changes speced out in #627
* ncreel: give each tablet an index, and print it #749
* reel: eliminate FIXME + param to insert_tabler() #749
* ncreel: label tablets with their adress to correlate against debugging logs #749
* more terminal environment variable notes
* TERMS.md: add Sakura, st
* ncreel: move legend out of reel proper
* ncreel_options: dump min/max_supported_rows/cols #627
* ncreel: remove weird one-off input layer #627
* ncreel: add ncreel_offer_input()
* reel demo: call demo_getc()
* reel demo: rig up input to demo main
* ncreel: drop ncreel_del_focused(), properly bind tablets
* reel demo: don't free up necessary plane
* ncreel: don't pull absolute locations of tablets
* ncreel: place tablets correctly in boundrel
* reel demo: add back support for left/right
* reel demo: restore thread movement
* ncreel: remove a great deal of complexity
* reel demo: stay out of FPS graph's way
* ncreel: give each tablet an index, and print it #749
* reel: eliminate FIXME + param to insert_tabler() #749
* ncreel: label tablets with their adress to correlate against debugging logs #749
* ncreel: move legend out of reel proper
* ncreel_options: dump min/max_supported_rows/cols #627
* ncreel: remove weird one-off input layer #627
* ncreel: add ncreel_offer_input()
* reel demo: call demo_getc()
* reel demo: rig up input to demo main
* ncreel: drop ncreel_del_focused(), properly bind tablets
* reel demo: don't free up necessary plane
* ncreel: don't pull absolute locations of tablets
* ncreel: place tablets correctly in boundrel
* reel demo: add back support for left/right
* reel demo: restore thread movement
* ncreel: remove a great deal of complexity
* reel demo: stay out of FPS graph's way
* reel: tighten up reel following redraw
* reel: fix upper-left corner of topless perimeter
* ncreel: print linecount, return clipped value
* reel: draw focused tablet relative to reel
* reel: brute force decruftification, how embarrassing #749
2020-07-09 06:02:23 +00:00
|
|
|
struct ncreel* nr = ncreel_create(n_, &r);
|
2020-02-05 22:29:42 +00:00
|
|
|
REQUIRE(nr);
|
|
|
|
CHECK(!ncreel_next(nr));
|
2020-08-09 21:40:59 +00:00
|
|
|
CHECK_EQ(0, notcurses_render(nc_));
|
|
|
|
CHECK(ncreel_validate(nr));
|
2020-02-05 22:29:42 +00:00
|
|
|
CHECK(!ncreel_prev(nr));
|
2020-08-09 21:40:59 +00:00
|
|
|
CHECK_EQ(0, notcurses_render(nc_));
|
|
|
|
CHECK(ncreel_validate(nr));
|
2020-09-27 19:57:03 +00:00
|
|
|
ncreel_destroy(nr);
|
2020-02-05 22:29:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
SUBCASE("OneTablet") {
|
|
|
|
ncreel_options r{};
|
Tons of work on ncreel (#776)
Tons of work on ncreel (#627, #749, #694)
Improve reel demo: get input wired up once more, avoid the FPS demo at bottom, print pointer and line count in each tablet, use new ncreel API. Improve notcurses-ncreel explorer: kill memory leaks (#694), draw tablets better, use new ncreel API. Fix bug in ncreel core where cruft could be left on the screen, via a very gross brute force algorithm. I'll likely come back and make this a bit less ghastly in the future #749. Remove weird one-off input system from ncreel, residue from outcurses. Make some of the normalizing changes speced out in #627
* ncreel: give each tablet an index, and print it #749
* reel: eliminate FIXME + param to insert_tabler() #749
* ncreel: label tablets with their adress to correlate against debugging logs #749
* more terminal environment variable notes
* TERMS.md: add Sakura, st
* ncreel: move legend out of reel proper
* ncreel_options: dump min/max_supported_rows/cols #627
* ncreel: remove weird one-off input layer #627
* ncreel: add ncreel_offer_input()
* reel demo: call demo_getc()
* reel demo: rig up input to demo main
* ncreel: drop ncreel_del_focused(), properly bind tablets
* reel demo: don't free up necessary plane
* ncreel: don't pull absolute locations of tablets
* ncreel: place tablets correctly in boundrel
* reel demo: add back support for left/right
* reel demo: restore thread movement
* ncreel: remove a great deal of complexity
* reel demo: stay out of FPS graph's way
* ncreel: give each tablet an index, and print it #749
* reel: eliminate FIXME + param to insert_tabler() #749
* ncreel: label tablets with their adress to correlate against debugging logs #749
* ncreel: move legend out of reel proper
* ncreel_options: dump min/max_supported_rows/cols #627
* ncreel: remove weird one-off input layer #627
* ncreel: add ncreel_offer_input()
* reel demo: call demo_getc()
* reel demo: rig up input to demo main
* ncreel: drop ncreel_del_focused(), properly bind tablets
* reel demo: don't free up necessary plane
* ncreel: don't pull absolute locations of tablets
* ncreel: place tablets correctly in boundrel
* reel demo: add back support for left/right
* reel demo: restore thread movement
* ncreel: remove a great deal of complexity
* reel demo: stay out of FPS graph's way
* reel: tighten up reel following redraw
* reel: fix upper-left corner of topless perimeter
* ncreel: print linecount, return clipped value
* reel: draw focused tablet relative to reel
* reel: brute force decruftification, how embarrassing #749
2020-07-09 06:02:23 +00:00
|
|
|
struct ncreel* nr = ncreel_create(n_, &r);
|
2020-02-05 22:29:42 +00:00
|
|
|
REQUIRE(nr);
|
2020-09-28 09:40:31 +00:00
|
|
|
nctablet* t = ncreel_add(nr, nullptr, nullptr, panelcb, nullptr);
|
2020-02-05 22:29:42 +00:00
|
|
|
REQUIRE(t);
|
2020-08-09 21:40:59 +00:00
|
|
|
CHECK_EQ(0, notcurses_render(nc_));
|
|
|
|
CHECK(ncreel_validate(nr));
|
2020-02-05 22:29:42 +00:00
|
|
|
CHECK(0 == ncreel_del(nr, t));
|
2020-08-09 21:40:59 +00:00
|
|
|
CHECK_EQ(0, notcurses_render(nc_));
|
|
|
|
CHECK(ncreel_validate(nr));
|
2020-09-27 19:57:03 +00:00
|
|
|
ncreel_destroy(nr);
|
2020-02-05 22:29:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
SUBCASE("MovementWithOneTablet") {
|
|
|
|
ncreel_options r{};
|
Tons of work on ncreel (#776)
Tons of work on ncreel (#627, #749, #694)
Improve reel demo: get input wired up once more, avoid the FPS demo at bottom, print pointer and line count in each tablet, use new ncreel API. Improve notcurses-ncreel explorer: kill memory leaks (#694), draw tablets better, use new ncreel API. Fix bug in ncreel core where cruft could be left on the screen, via a very gross brute force algorithm. I'll likely come back and make this a bit less ghastly in the future #749. Remove weird one-off input system from ncreel, residue from outcurses. Make some of the normalizing changes speced out in #627
* ncreel: give each tablet an index, and print it #749
* reel: eliminate FIXME + param to insert_tabler() #749
* ncreel: label tablets with their adress to correlate against debugging logs #749
* more terminal environment variable notes
* TERMS.md: add Sakura, st
* ncreel: move legend out of reel proper
* ncreel_options: dump min/max_supported_rows/cols #627
* ncreel: remove weird one-off input layer #627
* ncreel: add ncreel_offer_input()
* reel demo: call demo_getc()
* reel demo: rig up input to demo main
* ncreel: drop ncreel_del_focused(), properly bind tablets
* reel demo: don't free up necessary plane
* ncreel: don't pull absolute locations of tablets
* ncreel: place tablets correctly in boundrel
* reel demo: add back support for left/right
* reel demo: restore thread movement
* ncreel: remove a great deal of complexity
* reel demo: stay out of FPS graph's way
* ncreel: give each tablet an index, and print it #749
* reel: eliminate FIXME + param to insert_tabler() #749
* ncreel: label tablets with their adress to correlate against debugging logs #749
* ncreel: move legend out of reel proper
* ncreel_options: dump min/max_supported_rows/cols #627
* ncreel: remove weird one-off input layer #627
* ncreel: add ncreel_offer_input()
* reel demo: call demo_getc()
* reel demo: rig up input to demo main
* ncreel: drop ncreel_del_focused(), properly bind tablets
* reel demo: don't free up necessary plane
* ncreel: don't pull absolute locations of tablets
* ncreel: place tablets correctly in boundrel
* reel demo: add back support for left/right
* reel demo: restore thread movement
* ncreel: remove a great deal of complexity
* reel demo: stay out of FPS graph's way
* reel: tighten up reel following redraw
* reel: fix upper-left corner of topless perimeter
* ncreel: print linecount, return clipped value
* reel: draw focused tablet relative to reel
* reel: brute force decruftification, how embarrassing #749
2020-07-09 06:02:23 +00:00
|
|
|
struct ncreel* nr = ncreel_create(n_, &r);
|
2020-02-05 22:29:42 +00:00
|
|
|
REQUIRE(nr);
|
2020-09-28 09:40:31 +00:00
|
|
|
nctablet* t = ncreel_add(nr, nullptr, nullptr, panelcb, nullptr);
|
2020-02-05 22:29:42 +00:00
|
|
|
REQUIRE(t);
|
2020-08-09 21:40:59 +00:00
|
|
|
CHECK_EQ(0, notcurses_render(nc_));
|
|
|
|
CHECK(ncreel_validate(nr));
|
2020-02-05 22:29:42 +00:00
|
|
|
CHECK(ncreel_next(nr));
|
2020-08-09 21:40:59 +00:00
|
|
|
CHECK_EQ(0, notcurses_render(nc_));
|
|
|
|
CHECK(ncreel_validate(nr));
|
2020-02-05 22:29:42 +00:00
|
|
|
CHECK(ncreel_prev(nr));
|
2020-08-09 21:40:59 +00:00
|
|
|
CHECK_EQ(0, notcurses_render(nc_));
|
|
|
|
CHECK(ncreel_validate(nr));
|
2020-02-05 22:29:42 +00:00
|
|
|
CHECK(0 == ncreel_del(nr, t));
|
2020-08-09 21:40:59 +00:00
|
|
|
CHECK_EQ(0, notcurses_render(nc_));
|
|
|
|
CHECK(ncreel_validate(nr));
|
2020-09-27 19:57:03 +00:00
|
|
|
ncreel_destroy(nr);
|
2020-02-05 22:29:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
SUBCASE("DeleteActiveTablet") {
|
|
|
|
ncreel_options r{};
|
Tons of work on ncreel (#776)
Tons of work on ncreel (#627, #749, #694)
Improve reel demo: get input wired up once more, avoid the FPS demo at bottom, print pointer and line count in each tablet, use new ncreel API. Improve notcurses-ncreel explorer: kill memory leaks (#694), draw tablets better, use new ncreel API. Fix bug in ncreel core where cruft could be left on the screen, via a very gross brute force algorithm. I'll likely come back and make this a bit less ghastly in the future #749. Remove weird one-off input system from ncreel, residue from outcurses. Make some of the normalizing changes speced out in #627
* ncreel: give each tablet an index, and print it #749
* reel: eliminate FIXME + param to insert_tabler() #749
* ncreel: label tablets with their adress to correlate against debugging logs #749
* more terminal environment variable notes
* TERMS.md: add Sakura, st
* ncreel: move legend out of reel proper
* ncreel_options: dump min/max_supported_rows/cols #627
* ncreel: remove weird one-off input layer #627
* ncreel: add ncreel_offer_input()
* reel demo: call demo_getc()
* reel demo: rig up input to demo main
* ncreel: drop ncreel_del_focused(), properly bind tablets
* reel demo: don't free up necessary plane
* ncreel: don't pull absolute locations of tablets
* ncreel: place tablets correctly in boundrel
* reel demo: add back support for left/right
* reel demo: restore thread movement
* ncreel: remove a great deal of complexity
* reel demo: stay out of FPS graph's way
* ncreel: give each tablet an index, and print it #749
* reel: eliminate FIXME + param to insert_tabler() #749
* ncreel: label tablets with their adress to correlate against debugging logs #749
* ncreel: move legend out of reel proper
* ncreel_options: dump min/max_supported_rows/cols #627
* ncreel: remove weird one-off input layer #627
* ncreel: add ncreel_offer_input()
* reel demo: call demo_getc()
* reel demo: rig up input to demo main
* ncreel: drop ncreel_del_focused(), properly bind tablets
* reel demo: don't free up necessary plane
* ncreel: don't pull absolute locations of tablets
* ncreel: place tablets correctly in boundrel
* reel demo: add back support for left/right
* reel demo: restore thread movement
* ncreel: remove a great deal of complexity
* reel demo: stay out of FPS graph's way
* reel: tighten up reel following redraw
* reel: fix upper-left corner of topless perimeter
* ncreel: print linecount, return clipped value
* reel: draw focused tablet relative to reel
* reel: brute force decruftification, how embarrassing #749
2020-07-09 06:02:23 +00:00
|
|
|
struct ncreel* nr = ncreel_create(n_, &r);
|
2020-02-05 22:29:42 +00:00
|
|
|
REQUIRE(nr);
|
2020-09-28 09:40:31 +00:00
|
|
|
nctablet* t = ncreel_add(nr, nullptr, nullptr, panelcb, nullptr);
|
2020-02-05 22:29:42 +00:00
|
|
|
REQUIRE(t);
|
Tons of work on ncreel (#776)
Tons of work on ncreel (#627, #749, #694)
Improve reel demo: get input wired up once more, avoid the FPS demo at bottom, print pointer and line count in each tablet, use new ncreel API. Improve notcurses-ncreel explorer: kill memory leaks (#694), draw tablets better, use new ncreel API. Fix bug in ncreel core where cruft could be left on the screen, via a very gross brute force algorithm. I'll likely come back and make this a bit less ghastly in the future #749. Remove weird one-off input system from ncreel, residue from outcurses. Make some of the normalizing changes speced out in #627
* ncreel: give each tablet an index, and print it #749
* reel: eliminate FIXME + param to insert_tabler() #749
* ncreel: label tablets with their adress to correlate against debugging logs #749
* more terminal environment variable notes
* TERMS.md: add Sakura, st
* ncreel: move legend out of reel proper
* ncreel_options: dump min/max_supported_rows/cols #627
* ncreel: remove weird one-off input layer #627
* ncreel: add ncreel_offer_input()
* reel demo: call demo_getc()
* reel demo: rig up input to demo main
* ncreel: drop ncreel_del_focused(), properly bind tablets
* reel demo: don't free up necessary plane
* ncreel: don't pull absolute locations of tablets
* ncreel: place tablets correctly in boundrel
* reel demo: add back support for left/right
* reel demo: restore thread movement
* ncreel: remove a great deal of complexity
* reel demo: stay out of FPS graph's way
* ncreel: give each tablet an index, and print it #749
* reel: eliminate FIXME + param to insert_tabler() #749
* ncreel: label tablets with their adress to correlate against debugging logs #749
* ncreel: move legend out of reel proper
* ncreel_options: dump min/max_supported_rows/cols #627
* ncreel: remove weird one-off input layer #627
* ncreel: add ncreel_offer_input()
* reel demo: call demo_getc()
* reel demo: rig up input to demo main
* ncreel: drop ncreel_del_focused(), properly bind tablets
* reel demo: don't free up necessary plane
* ncreel: don't pull absolute locations of tablets
* ncreel: place tablets correctly in boundrel
* reel demo: add back support for left/right
* reel demo: restore thread movement
* ncreel: remove a great deal of complexity
* reel demo: stay out of FPS graph's way
* reel: tighten up reel following redraw
* reel: fix upper-left corner of topless perimeter
* ncreel: print linecount, return clipped value
* reel: draw focused tablet relative to reel
* reel: brute force decruftification, how embarrassing #749
2020-07-09 06:02:23 +00:00
|
|
|
CHECK(0 == ncreel_del(nr, ncreel_focused(nr)));
|
2020-08-09 21:40:59 +00:00
|
|
|
CHECK_EQ(0, notcurses_render(nc_));
|
|
|
|
CHECK(ncreel_validate(nr));
|
2020-09-27 19:57:03 +00:00
|
|
|
ncreel_destroy(nr);
|
2020-02-05 22:29:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
SUBCASE("NoBorder") {
|
|
|
|
ncreel_options r{};
|
|
|
|
r.bordermask = NCBOXMASK_LEFT | NCBOXMASK_RIGHT |
|
|
|
|
NCBOXMASK_TOP | NCBOXMASK_BOTTOM;
|
Tons of work on ncreel (#776)
Tons of work on ncreel (#627, #749, #694)
Improve reel demo: get input wired up once more, avoid the FPS demo at bottom, print pointer and line count in each tablet, use new ncreel API. Improve notcurses-ncreel explorer: kill memory leaks (#694), draw tablets better, use new ncreel API. Fix bug in ncreel core where cruft could be left on the screen, via a very gross brute force algorithm. I'll likely come back and make this a bit less ghastly in the future #749. Remove weird one-off input system from ncreel, residue from outcurses. Make some of the normalizing changes speced out in #627
* ncreel: give each tablet an index, and print it #749
* reel: eliminate FIXME + param to insert_tabler() #749
* ncreel: label tablets with their adress to correlate against debugging logs #749
* more terminal environment variable notes
* TERMS.md: add Sakura, st
* ncreel: move legend out of reel proper
* ncreel_options: dump min/max_supported_rows/cols #627
* ncreel: remove weird one-off input layer #627
* ncreel: add ncreel_offer_input()
* reel demo: call demo_getc()
* reel demo: rig up input to demo main
* ncreel: drop ncreel_del_focused(), properly bind tablets
* reel demo: don't free up necessary plane
* ncreel: don't pull absolute locations of tablets
* ncreel: place tablets correctly in boundrel
* reel demo: add back support for left/right
* reel demo: restore thread movement
* ncreel: remove a great deal of complexity
* reel demo: stay out of FPS graph's way
* ncreel: give each tablet an index, and print it #749
* reel: eliminate FIXME + param to insert_tabler() #749
* ncreel: label tablets with their adress to correlate against debugging logs #749
* ncreel: move legend out of reel proper
* ncreel_options: dump min/max_supported_rows/cols #627
* ncreel: remove weird one-off input layer #627
* ncreel: add ncreel_offer_input()
* reel demo: call demo_getc()
* reel demo: rig up input to demo main
* ncreel: drop ncreel_del_focused(), properly bind tablets
* reel demo: don't free up necessary plane
* ncreel: don't pull absolute locations of tablets
* ncreel: place tablets correctly in boundrel
* reel demo: add back support for left/right
* reel demo: restore thread movement
* ncreel: remove a great deal of complexity
* reel demo: stay out of FPS graph's way
* reel: tighten up reel following redraw
* reel: fix upper-left corner of topless perimeter
* ncreel: print linecount, return clipped value
* reel: draw focused tablet relative to reel
* reel: brute force decruftification, how embarrassing #749
2020-07-09 06:02:23 +00:00
|
|
|
struct ncreel* nr = ncreel_create(n_, &r);
|
2020-02-05 22:29:42 +00:00
|
|
|
REQUIRE(nr);
|
2020-08-09 21:40:59 +00:00
|
|
|
CHECK_EQ(0, ncreel_redraw(nr));
|
|
|
|
CHECK_EQ(0, notcurses_render(nc_));
|
|
|
|
CHECK(ncreel_validate(nr));
|
2020-09-27 19:57:03 +00:00
|
|
|
ncreel_destroy(nr);
|
2020-02-05 22:29:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
SUBCASE("BadBorderBitsRejected") {
|
|
|
|
ncreel_options r{};
|
|
|
|
r.bordermask = NCBOXMASK_LEFT * 2;
|
Tons of work on ncreel (#776)
Tons of work on ncreel (#627, #749, #694)
Improve reel demo: get input wired up once more, avoid the FPS demo at bottom, print pointer and line count in each tablet, use new ncreel API. Improve notcurses-ncreel explorer: kill memory leaks (#694), draw tablets better, use new ncreel API. Fix bug in ncreel core where cruft could be left on the screen, via a very gross brute force algorithm. I'll likely come back and make this a bit less ghastly in the future #749. Remove weird one-off input system from ncreel, residue from outcurses. Make some of the normalizing changes speced out in #627
* ncreel: give each tablet an index, and print it #749
* reel: eliminate FIXME + param to insert_tabler() #749
* ncreel: label tablets with their adress to correlate against debugging logs #749
* more terminal environment variable notes
* TERMS.md: add Sakura, st
* ncreel: move legend out of reel proper
* ncreel_options: dump min/max_supported_rows/cols #627
* ncreel: remove weird one-off input layer #627
* ncreel: add ncreel_offer_input()
* reel demo: call demo_getc()
* reel demo: rig up input to demo main
* ncreel: drop ncreel_del_focused(), properly bind tablets
* reel demo: don't free up necessary plane
* ncreel: don't pull absolute locations of tablets
* ncreel: place tablets correctly in boundrel
* reel demo: add back support for left/right
* reel demo: restore thread movement
* ncreel: remove a great deal of complexity
* reel demo: stay out of FPS graph's way
* ncreel: give each tablet an index, and print it #749
* reel: eliminate FIXME + param to insert_tabler() #749
* ncreel: label tablets with their adress to correlate against debugging logs #749
* ncreel: move legend out of reel proper
* ncreel_options: dump min/max_supported_rows/cols #627
* ncreel: remove weird one-off input layer #627
* ncreel: add ncreel_offer_input()
* reel demo: call demo_getc()
* reel demo: rig up input to demo main
* ncreel: drop ncreel_del_focused(), properly bind tablets
* reel demo: don't free up necessary plane
* ncreel: don't pull absolute locations of tablets
* ncreel: place tablets correctly in boundrel
* reel demo: add back support for left/right
* reel demo: restore thread movement
* ncreel: remove a great deal of complexity
* reel demo: stay out of FPS graph's way
* reel: tighten up reel following redraw
* reel: fix upper-left corner of topless perimeter
* ncreel: print linecount, return clipped value
* reel: draw focused tablet relative to reel
* reel: brute force decruftification, how embarrassing #749
2020-07-09 06:02:23 +00:00
|
|
|
struct ncreel* nr = ncreel_create(n_, &r);
|
2020-02-05 22:29:42 +00:00
|
|
|
REQUIRE(!nr);
|
|
|
|
}
|
|
|
|
|
|
|
|
SUBCASE("NoTabletBorder") {
|
|
|
|
ncreel_options r{};
|
|
|
|
r.tabletmask = NCBOXMASK_LEFT | NCBOXMASK_RIGHT |
|
|
|
|
NCBOXMASK_TOP | NCBOXMASK_BOTTOM;
|
Tons of work on ncreel (#776)
Tons of work on ncreel (#627, #749, #694)
Improve reel demo: get input wired up once more, avoid the FPS demo at bottom, print pointer and line count in each tablet, use new ncreel API. Improve notcurses-ncreel explorer: kill memory leaks (#694), draw tablets better, use new ncreel API. Fix bug in ncreel core where cruft could be left on the screen, via a very gross brute force algorithm. I'll likely come back and make this a bit less ghastly in the future #749. Remove weird one-off input system from ncreel, residue from outcurses. Make some of the normalizing changes speced out in #627
* ncreel: give each tablet an index, and print it #749
* reel: eliminate FIXME + param to insert_tabler() #749
* ncreel: label tablets with their adress to correlate against debugging logs #749
* more terminal environment variable notes
* TERMS.md: add Sakura, st
* ncreel: move legend out of reel proper
* ncreel_options: dump min/max_supported_rows/cols #627
* ncreel: remove weird one-off input layer #627
* ncreel: add ncreel_offer_input()
* reel demo: call demo_getc()
* reel demo: rig up input to demo main
* ncreel: drop ncreel_del_focused(), properly bind tablets
* reel demo: don't free up necessary plane
* ncreel: don't pull absolute locations of tablets
* ncreel: place tablets correctly in boundrel
* reel demo: add back support for left/right
* reel demo: restore thread movement
* ncreel: remove a great deal of complexity
* reel demo: stay out of FPS graph's way
* ncreel: give each tablet an index, and print it #749
* reel: eliminate FIXME + param to insert_tabler() #749
* ncreel: label tablets with their adress to correlate against debugging logs #749
* ncreel: move legend out of reel proper
* ncreel_options: dump min/max_supported_rows/cols #627
* ncreel: remove weird one-off input layer #627
* ncreel: add ncreel_offer_input()
* reel demo: call demo_getc()
* reel demo: rig up input to demo main
* ncreel: drop ncreel_del_focused(), properly bind tablets
* reel demo: don't free up necessary plane
* ncreel: don't pull absolute locations of tablets
* ncreel: place tablets correctly in boundrel
* reel demo: add back support for left/right
* reel demo: restore thread movement
* ncreel: remove a great deal of complexity
* reel demo: stay out of FPS graph's way
* reel: tighten up reel following redraw
* reel: fix upper-left corner of topless perimeter
* ncreel: print linecount, return clipped value
* reel: draw focused tablet relative to reel
* reel: brute force decruftification, how embarrassing #749
2020-07-09 06:02:23 +00:00
|
|
|
struct ncreel* nr = ncreel_create(n_, &r);
|
2020-02-05 22:29:42 +00:00
|
|
|
REQUIRE(nr);
|
2020-08-09 21:40:59 +00:00
|
|
|
CHECK_EQ(0, ncreel_redraw(nr));
|
|
|
|
CHECK_EQ(0, notcurses_render(nc_));
|
|
|
|
CHECK(ncreel_validate(nr));
|
2020-09-27 19:57:03 +00:00
|
|
|
ncreel_destroy(nr);
|
2020-02-05 22:29:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
SUBCASE("NoTopBottomBorder") {
|
|
|
|
ncreel_options r{};
|
|
|
|
r.bordermask = NCBOXMASK_TOP | NCBOXMASK_BOTTOM;
|
Tons of work on ncreel (#776)
Tons of work on ncreel (#627, #749, #694)
Improve reel demo: get input wired up once more, avoid the FPS demo at bottom, print pointer and line count in each tablet, use new ncreel API. Improve notcurses-ncreel explorer: kill memory leaks (#694), draw tablets better, use new ncreel API. Fix bug in ncreel core where cruft could be left on the screen, via a very gross brute force algorithm. I'll likely come back and make this a bit less ghastly in the future #749. Remove weird one-off input system from ncreel, residue from outcurses. Make some of the normalizing changes speced out in #627
* ncreel: give each tablet an index, and print it #749
* reel: eliminate FIXME + param to insert_tabler() #749
* ncreel: label tablets with their adress to correlate against debugging logs #749
* more terminal environment variable notes
* TERMS.md: add Sakura, st
* ncreel: move legend out of reel proper
* ncreel_options: dump min/max_supported_rows/cols #627
* ncreel: remove weird one-off input layer #627
* ncreel: add ncreel_offer_input()
* reel demo: call demo_getc()
* reel demo: rig up input to demo main
* ncreel: drop ncreel_del_focused(), properly bind tablets
* reel demo: don't free up necessary plane
* ncreel: don't pull absolute locations of tablets
* ncreel: place tablets correctly in boundrel
* reel demo: add back support for left/right
* reel demo: restore thread movement
* ncreel: remove a great deal of complexity
* reel demo: stay out of FPS graph's way
* ncreel: give each tablet an index, and print it #749
* reel: eliminate FIXME + param to insert_tabler() #749
* ncreel: label tablets with their adress to correlate against debugging logs #749
* ncreel: move legend out of reel proper
* ncreel_options: dump min/max_supported_rows/cols #627
* ncreel: remove weird one-off input layer #627
* ncreel: add ncreel_offer_input()
* reel demo: call demo_getc()
* reel demo: rig up input to demo main
* ncreel: drop ncreel_del_focused(), properly bind tablets
* reel demo: don't free up necessary plane
* ncreel: don't pull absolute locations of tablets
* ncreel: place tablets correctly in boundrel
* reel demo: add back support for left/right
* reel demo: restore thread movement
* ncreel: remove a great deal of complexity
* reel demo: stay out of FPS graph's way
* reel: tighten up reel following redraw
* reel: fix upper-left corner of topless perimeter
* ncreel: print linecount, return clipped value
* reel: draw focused tablet relative to reel
* reel: brute force decruftification, how embarrassing #749
2020-07-09 06:02:23 +00:00
|
|
|
struct ncreel* nr = ncreel_create(n_, &r);
|
2020-02-05 22:29:42 +00:00
|
|
|
REQUIRE(nr);
|
2020-08-09 21:40:59 +00:00
|
|
|
CHECK_EQ(0, ncreel_redraw(nr));
|
|
|
|
CHECK_EQ(0, notcurses_render(nc_));
|
|
|
|
CHECK(ncreel_validate(nr));
|
2020-09-27 19:57:03 +00:00
|
|
|
ncreel_destroy(nr);
|
2020-02-05 22:29:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
SUBCASE("NoSideBorders") {
|
|
|
|
ncreel_options r{};
|
|
|
|
r.bordermask = NCBOXMASK_LEFT | NCBOXMASK_RIGHT;
|
Tons of work on ncreel (#776)
Tons of work on ncreel (#627, #749, #694)
Improve reel demo: get input wired up once more, avoid the FPS demo at bottom, print pointer and line count in each tablet, use new ncreel API. Improve notcurses-ncreel explorer: kill memory leaks (#694), draw tablets better, use new ncreel API. Fix bug in ncreel core where cruft could be left on the screen, via a very gross brute force algorithm. I'll likely come back and make this a bit less ghastly in the future #749. Remove weird one-off input system from ncreel, residue from outcurses. Make some of the normalizing changes speced out in #627
* ncreel: give each tablet an index, and print it #749
* reel: eliminate FIXME + param to insert_tabler() #749
* ncreel: label tablets with their adress to correlate against debugging logs #749
* more terminal environment variable notes
* TERMS.md: add Sakura, st
* ncreel: move legend out of reel proper
* ncreel_options: dump min/max_supported_rows/cols #627
* ncreel: remove weird one-off input layer #627
* ncreel: add ncreel_offer_input()
* reel demo: call demo_getc()
* reel demo: rig up input to demo main
* ncreel: drop ncreel_del_focused(), properly bind tablets
* reel demo: don't free up necessary plane
* ncreel: don't pull absolute locations of tablets
* ncreel: place tablets correctly in boundrel
* reel demo: add back support for left/right
* reel demo: restore thread movement
* ncreel: remove a great deal of complexity
* reel demo: stay out of FPS graph's way
* ncreel: give each tablet an index, and print it #749
* reel: eliminate FIXME + param to insert_tabler() #749
* ncreel: label tablets with their adress to correlate against debugging logs #749
* ncreel: move legend out of reel proper
* ncreel_options: dump min/max_supported_rows/cols #627
* ncreel: remove weird one-off input layer #627
* ncreel: add ncreel_offer_input()
* reel demo: call demo_getc()
* reel demo: rig up input to demo main
* ncreel: drop ncreel_del_focused(), properly bind tablets
* reel demo: don't free up necessary plane
* ncreel: don't pull absolute locations of tablets
* ncreel: place tablets correctly in boundrel
* reel demo: add back support for left/right
* reel demo: restore thread movement
* ncreel: remove a great deal of complexity
* reel demo: stay out of FPS graph's way
* reel: tighten up reel following redraw
* reel: fix upper-left corner of topless perimeter
* ncreel: print linecount, return clipped value
* reel: draw focused tablet relative to reel
* reel: brute force decruftification, how embarrassing #749
2020-07-09 06:02:23 +00:00
|
|
|
struct ncreel* nr = ncreel_create(n_, &r);
|
2020-02-05 22:29:42 +00:00
|
|
|
REQUIRE(nr);
|
2020-08-09 21:40:59 +00:00
|
|
|
CHECK_EQ(0, ncreel_redraw(nr));
|
|
|
|
CHECK_EQ(0, notcurses_render(nc_));
|
|
|
|
CHECK(ncreel_validate(nr));
|
2020-09-27 19:57:03 +00:00
|
|
|
ncreel_destroy(nr);
|
2020-02-05 22:29:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
SUBCASE("BadTabletBorderBitsRejected") {
|
|
|
|
ncreel_options r{};
|
|
|
|
r.tabletmask = NCBOXMASK_LEFT * 2;
|
Tons of work on ncreel (#776)
Tons of work on ncreel (#627, #749, #694)
Improve reel demo: get input wired up once more, avoid the FPS demo at bottom, print pointer and line count in each tablet, use new ncreel API. Improve notcurses-ncreel explorer: kill memory leaks (#694), draw tablets better, use new ncreel API. Fix bug in ncreel core where cruft could be left on the screen, via a very gross brute force algorithm. I'll likely come back and make this a bit less ghastly in the future #749. Remove weird one-off input system from ncreel, residue from outcurses. Make some of the normalizing changes speced out in #627
* ncreel: give each tablet an index, and print it #749
* reel: eliminate FIXME + param to insert_tabler() #749
* ncreel: label tablets with their adress to correlate against debugging logs #749
* more terminal environment variable notes
* TERMS.md: add Sakura, st
* ncreel: move legend out of reel proper
* ncreel_options: dump min/max_supported_rows/cols #627
* ncreel: remove weird one-off input layer #627
* ncreel: add ncreel_offer_input()
* reel demo: call demo_getc()
* reel demo: rig up input to demo main
* ncreel: drop ncreel_del_focused(), properly bind tablets
* reel demo: don't free up necessary plane
* ncreel: don't pull absolute locations of tablets
* ncreel: place tablets correctly in boundrel
* reel demo: add back support for left/right
* reel demo: restore thread movement
* ncreel: remove a great deal of complexity
* reel demo: stay out of FPS graph's way
* ncreel: give each tablet an index, and print it #749
* reel: eliminate FIXME + param to insert_tabler() #749
* ncreel: label tablets with their adress to correlate against debugging logs #749
* ncreel: move legend out of reel proper
* ncreel_options: dump min/max_supported_rows/cols #627
* ncreel: remove weird one-off input layer #627
* ncreel: add ncreel_offer_input()
* reel demo: call demo_getc()
* reel demo: rig up input to demo main
* ncreel: drop ncreel_del_focused(), properly bind tablets
* reel demo: don't free up necessary plane
* ncreel: don't pull absolute locations of tablets
* ncreel: place tablets correctly in boundrel
* reel demo: add back support for left/right
* reel demo: restore thread movement
* ncreel: remove a great deal of complexity
* reel demo: stay out of FPS graph's way
* reel: tighten up reel following redraw
* reel: fix upper-left corner of topless perimeter
* ncreel: print linecount, return clipped value
* reel: draw focused tablet relative to reel
* reel: brute force decruftification, how embarrassing #749
2020-07-09 06:02:23 +00:00
|
|
|
struct ncreel* nr = ncreel_create(n_, &r);
|
2020-02-05 22:29:42 +00:00
|
|
|
REQUIRE(!nr);
|
|
|
|
}
|
|
|
|
|
2020-08-09 21:40:59 +00:00
|
|
|
SUBCASE("TransparentBackground") {
|
2020-02-05 22:29:42 +00:00
|
|
|
ncreel_options r{};
|
2020-09-13 18:18:42 +00:00
|
|
|
int dimy, dimx;
|
|
|
|
notcurses_term_dim_yx(nc_, &dimy, &dimx);
|
|
|
|
uint64_t channels = 0;
|
|
|
|
channels_set_bg_alpha(&channels, CELL_ALPHA_TRANSPARENT);
|
2020-11-14 22:00:07 +00:00
|
|
|
struct ncplane_options nopts = {
|
|
|
|
.y = 0,
|
|
|
|
.horiz = { .x = 0, },
|
|
|
|
.rows = dimy,
|
|
|
|
.cols = dimx,
|
|
|
|
.userptr = nullptr,
|
|
|
|
.name = nullptr,
|
|
|
|
.resizecb = nullptr,
|
|
|
|
.flags = 0,
|
|
|
|
};
|
|
|
|
auto ncp = ncplane_create(n_, &nopts);
|
2020-09-13 18:18:42 +00:00
|
|
|
REQUIRE(nullptr != ncp);
|
|
|
|
CHECK(0 == ncplane_set_base(ncp, "", 0, channels));
|
2020-08-09 21:40:59 +00:00
|
|
|
struct ncreel* nr = ncreel_create(n_, &r);
|
|
|
|
REQUIRE(nr);
|
|
|
|
CHECK_EQ(0, ncreel_redraw(nr));
|
|
|
|
CHECK_EQ(0, notcurses_render(nc_));
|
|
|
|
CHECK(ncreel_validate(nr));
|
2020-09-27 19:57:03 +00:00
|
|
|
ncreel_destroy(nr);
|
2020-08-09 21:40:59 +00:00
|
|
|
}
|
2020-02-05 22:29:42 +00:00
|
|
|
|
2020-08-09 21:40:59 +00:00
|
|
|
// Layout tests. Add some tablets, move around, and verify that they all
|
|
|
|
// have the expected locations/contents/geometries.
|
|
|
|
SUBCASE("ThreeCycleDown") {
|
2020-02-05 22:29:42 +00:00
|
|
|
ncreel_options r{};
|
Tons of work on ncreel (#776)
Tons of work on ncreel (#627, #749, #694)
Improve reel demo: get input wired up once more, avoid the FPS demo at bottom, print pointer and line count in each tablet, use new ncreel API. Improve notcurses-ncreel explorer: kill memory leaks (#694), draw tablets better, use new ncreel API. Fix bug in ncreel core where cruft could be left on the screen, via a very gross brute force algorithm. I'll likely come back and make this a bit less ghastly in the future #749. Remove weird one-off input system from ncreel, residue from outcurses. Make some of the normalizing changes speced out in #627
* ncreel: give each tablet an index, and print it #749
* reel: eliminate FIXME + param to insert_tabler() #749
* ncreel: label tablets with their adress to correlate against debugging logs #749
* more terminal environment variable notes
* TERMS.md: add Sakura, st
* ncreel: move legend out of reel proper
* ncreel_options: dump min/max_supported_rows/cols #627
* ncreel: remove weird one-off input layer #627
* ncreel: add ncreel_offer_input()
* reel demo: call demo_getc()
* reel demo: rig up input to demo main
* ncreel: drop ncreel_del_focused(), properly bind tablets
* reel demo: don't free up necessary plane
* ncreel: don't pull absolute locations of tablets
* ncreel: place tablets correctly in boundrel
* reel demo: add back support for left/right
* reel demo: restore thread movement
* ncreel: remove a great deal of complexity
* reel demo: stay out of FPS graph's way
* ncreel: give each tablet an index, and print it #749
* reel: eliminate FIXME + param to insert_tabler() #749
* ncreel: label tablets with their adress to correlate against debugging logs #749
* ncreel: move legend out of reel proper
* ncreel_options: dump min/max_supported_rows/cols #627
* ncreel: remove weird one-off input layer #627
* ncreel: add ncreel_offer_input()
* reel demo: call demo_getc()
* reel demo: rig up input to demo main
* ncreel: drop ncreel_del_focused(), properly bind tablets
* reel demo: don't free up necessary plane
* ncreel: don't pull absolute locations of tablets
* ncreel: place tablets correctly in boundrel
* reel demo: add back support for left/right
* reel demo: restore thread movement
* ncreel: remove a great deal of complexity
* reel demo: stay out of FPS graph's way
* reel: tighten up reel following redraw
* reel: fix upper-left corner of topless perimeter
* ncreel: print linecount, return clipped value
* reel: draw focused tablet relative to reel
* reel: brute force decruftification, how embarrassing #749
2020-07-09 06:02:23 +00:00
|
|
|
struct ncreel* nr = ncreel_create(n_, &r);
|
2020-02-05 22:29:42 +00:00
|
|
|
REQUIRE(nr);
|
2020-08-09 21:40:59 +00:00
|
|
|
CHECK_EQ(0, ncreel_redraw(nr));
|
|
|
|
CHECK_EQ(0, notcurses_render(nc_));
|
|
|
|
CHECK(ncreel_validate(nr));
|
|
|
|
int order[3];
|
|
|
|
nctablet* tabs[3];
|
|
|
|
for(size_t n = 0 ; n < sizeof(order) / sizeof(*order) ; ++n){
|
|
|
|
order[n] = -1;
|
|
|
|
tabs[n] = ncreel_add(nr, nullptr, nullptr, cbfxn, &order[n]);
|
|
|
|
REQUIRE(tabs[n]);
|
|
|
|
CHECK(tabs[0] == nr->tablets);
|
|
|
|
CHECK_EQ(0, notcurses_render(nc_));
|
|
|
|
CHECK(ncreel_validate(nr));
|
|
|
|
}
|
|
|
|
int expectedy = 1;
|
|
|
|
for(size_t n = 0 ; n < sizeof(order) / sizeof(*order) ; ++n){
|
|
|
|
CHECK_LE(0, order[n]);
|
|
|
|
int y;
|
2020-09-27 20:46:39 +00:00
|
|
|
ncplane_yx(ncplane_parent(nctablet_plane(tabs[n])), &y, nullptr);
|
2020-08-09 21:40:59 +00:00
|
|
|
CHECK(y == expectedy);
|
|
|
|
expectedy += 7;
|
|
|
|
}
|
|
|
|
ncreel_next(nr);
|
|
|
|
CHECK(tabs[1] == nr->tablets);
|
|
|
|
CHECK_EQ(0, notcurses_render(nc_));
|
|
|
|
CHECK(ncreel_validate(nr));
|
|
|
|
expectedy = 1;
|
|
|
|
for(size_t n = 0 ; n < sizeof(order) / sizeof(*order) ; ++n){
|
|
|
|
CHECK_LE(1, order[n]);
|
|
|
|
int y;
|
2020-09-27 20:46:39 +00:00
|
|
|
ncplane_yx(ncplane_parent(nctablet_plane(tabs[n])), &y, nullptr);
|
2020-08-09 21:40:59 +00:00
|
|
|
CHECK(y == expectedy);
|
|
|
|
expectedy += 7;
|
|
|
|
}
|
|
|
|
ncreel_next(nr);
|
|
|
|
CHECK(tabs[2] == nr->tablets);
|
|
|
|
CHECK_EQ(0, notcurses_render(nc_));
|
|
|
|
CHECK(ncreel_validate(nr));
|
|
|
|
expectedy = 1;
|
|
|
|
for(size_t n = 0 ; n < sizeof(order) / sizeof(*order) ; ++n){
|
2020-08-10 02:14:56 +00:00
|
|
|
CHECK_LE(2, order[n]);
|
2020-08-09 21:40:59 +00:00
|
|
|
int y;
|
2020-09-27 20:46:39 +00:00
|
|
|
ncplane_yx(ncplane_parent(nctablet_plane(tabs[n])), &y, nullptr);
|
2020-08-09 21:40:59 +00:00
|
|
|
CHECK(y == expectedy);
|
|
|
|
expectedy += 7;
|
|
|
|
}
|
|
|
|
ncreel_prev(nr);
|
|
|
|
CHECK(tabs[1] == nr->tablets);
|
|
|
|
CHECK_EQ(0, notcurses_render(nc_));
|
|
|
|
CHECK(ncreel_validate(nr));
|
|
|
|
expectedy = 1;
|
|
|
|
for(size_t n = 0 ; n < sizeof(order) / sizeof(*order) ; ++n){
|
2020-08-10 02:14:56 +00:00
|
|
|
CHECK_LE(3, order[n]);
|
2020-08-09 21:40:59 +00:00
|
|
|
int y;
|
2020-09-27 20:46:39 +00:00
|
|
|
ncplane_yx(ncplane_parent(nctablet_plane(tabs[n])), &y, nullptr);
|
2020-08-09 21:40:59 +00:00
|
|
|
CHECK(y == expectedy);
|
|
|
|
expectedy += 7;
|
|
|
|
}
|
|
|
|
ncreel_prev(nr);
|
|
|
|
CHECK(tabs[0] == nr->tablets);
|
|
|
|
CHECK_EQ(0, notcurses_render(nc_));
|
|
|
|
CHECK(ncreel_validate(nr));
|
|
|
|
expectedy = 1;
|
|
|
|
for(size_t n = 0 ; n < sizeof(order) / sizeof(*order) ; ++n){
|
2020-08-10 02:14:56 +00:00
|
|
|
CHECK_LE(4, order[n]);
|
2020-08-09 21:40:59 +00:00
|
|
|
int y;
|
2020-09-27 20:46:39 +00:00
|
|
|
ncplane_yx(ncplane_parent(nctablet_plane(tabs[n])), &y, nullptr);
|
2020-08-09 21:40:59 +00:00
|
|
|
CHECK(y == expectedy);
|
|
|
|
expectedy += 7;
|
|
|
|
}
|
2020-09-27 19:57:03 +00:00
|
|
|
ncreel_destroy(nr);
|
2020-02-05 22:29:42 +00:00
|
|
|
}
|
|
|
|
|
2020-08-10 02:14:56 +00:00
|
|
|
// Layout tests. Add some tablets, move around, and verify that they all
|
|
|
|
// have the expected locations/contents/geometries.
|
|
|
|
SUBCASE("ThreeCycleDownNoTabletBorders") {
|
|
|
|
ncreel_options r{};
|
|
|
|
r.tabletmask = 0xf;
|
|
|
|
struct ncreel* nr = ncreel_create(n_, &r);
|
|
|
|
REQUIRE(nr);
|
|
|
|
CHECK_EQ(0, notcurses_render(nc_));
|
|
|
|
CHECK(ncreel_validate(nr));
|
|
|
|
int order[3];
|
|
|
|
nctablet* tabs[3];
|
|
|
|
for(size_t n = 0 ; n < sizeof(order) / sizeof(*order) ; ++n){
|
|
|
|
order[n] = -1;
|
|
|
|
tabs[n] = ncreel_add(nr, nullptr, nullptr, cbfxn, &order[n]);
|
|
|
|
REQUIRE(tabs[n]);
|
|
|
|
CHECK(tabs[0] == nr->tablets);
|
|
|
|
CHECK_EQ(0, notcurses_render(nc_));
|
|
|
|
CHECK(ncreel_validate(nr));
|
|
|
|
}
|
|
|
|
int expectedy = 1;
|
|
|
|
for(size_t n = 0 ; n < sizeof(order) / sizeof(*order) ; ++n){
|
|
|
|
CHECK_LE(-1, order[n]);
|
|
|
|
int y;
|
2020-09-27 20:46:39 +00:00
|
|
|
ncplane_yx(ncplane_parent(nctablet_plane(tabs[n])), &y, nullptr);
|
2020-08-10 02:14:56 +00:00
|
|
|
CHECK(y == expectedy);
|
|
|
|
expectedy += 5;
|
|
|
|
}
|
|
|
|
ncreel_next(nr);
|
|
|
|
CHECK(tabs[1] == nr->tablets);
|
|
|
|
CHECK_EQ(0, notcurses_render(nc_));
|
|
|
|
CHECK(ncreel_validate(nr));
|
|
|
|
expectedy = 1;
|
|
|
|
for(size_t n = 0 ; n < sizeof(order) / sizeof(*order) ; ++n){
|
|
|
|
CHECK_LE(1, order[n]);
|
|
|
|
int y;
|
2020-09-27 20:46:39 +00:00
|
|
|
ncplane_yx(ncplane_parent(nctablet_plane(tabs[n])), &y, nullptr);
|
2020-08-10 02:14:56 +00:00
|
|
|
CHECK(y == expectedy);
|
|
|
|
expectedy += 5;
|
|
|
|
}
|
|
|
|
ncreel_next(nr);
|
|
|
|
CHECK(tabs[2] == nr->tablets);
|
|
|
|
CHECK_EQ(0, notcurses_render(nc_));
|
|
|
|
CHECK(ncreel_validate(nr));
|
|
|
|
expectedy = 1;
|
|
|
|
for(size_t n = 0 ; n < sizeof(order) / sizeof(*order) ; ++n){
|
|
|
|
CHECK_LE(2, order[n]);
|
|
|
|
int y;
|
2020-09-27 20:46:39 +00:00
|
|
|
ncplane_yx(ncplane_parent(nctablet_plane(tabs[n])), &y, nullptr);
|
2020-08-10 02:14:56 +00:00
|
|
|
CHECK(y == expectedy);
|
|
|
|
expectedy += 5;
|
|
|
|
}
|
|
|
|
ncreel_prev(nr);
|
|
|
|
CHECK(tabs[1] == nr->tablets);
|
|
|
|
CHECK_EQ(0, notcurses_render(nc_));
|
|
|
|
CHECK(ncreel_validate(nr));
|
|
|
|
expectedy = 1;
|
|
|
|
for(size_t n = 0 ; n < sizeof(order) / sizeof(*order) ; ++n){
|
|
|
|
CHECK_LE(3, order[n]);
|
|
|
|
int y;
|
2020-09-27 20:46:39 +00:00
|
|
|
ncplane_yx(ncplane_parent(nctablet_plane(tabs[n])), &y, nullptr);
|
2020-08-10 02:14:56 +00:00
|
|
|
CHECK(y == expectedy);
|
|
|
|
expectedy += 5;
|
|
|
|
}
|
|
|
|
ncreel_prev(nr);
|
|
|
|
CHECK(tabs[0] == nr->tablets);
|
|
|
|
CHECK_EQ(0, notcurses_render(nc_));
|
|
|
|
CHECK(ncreel_validate(nr));
|
|
|
|
expectedy = 1;
|
|
|
|
for(size_t n = 0 ; n < sizeof(order) / sizeof(*order) ; ++n){
|
|
|
|
CHECK_LE(4, order[n]);
|
|
|
|
int y;
|
2020-09-27 20:46:39 +00:00
|
|
|
ncplane_yx(ncplane_parent(nctablet_plane(tabs[n])), &y, nullptr);
|
2020-08-10 02:14:56 +00:00
|
|
|
CHECK(y == expectedy);
|
|
|
|
expectedy += 5;
|
|
|
|
}
|
2020-09-27 19:57:03 +00:00
|
|
|
ncreel_destroy(nr);
|
2020-08-10 02:14:56 +00:00
|
|
|
}
|
2020-09-28 09:40:31 +00:00
|
|
|
|
|
|
|
// tablet size checks----------------------------------------------------
|
|
|
|
// check that, with all borders, the tablets are the correct size
|
|
|
|
SUBCASE("AllBordersSize") {
|
|
|
|
ncreel_options r{};
|
|
|
|
struct ncreel* nr = ncreel_create(n_, &r);
|
|
|
|
REQUIRE(nr);
|
|
|
|
CHECK_EQ(0, notcurses_render(nc_));
|
|
|
|
CHECK(ncreel_validate(nr));
|
|
|
|
REQUIRE(nullptr != ncreel_add(nr, nullptr, nullptr, check_allborders, nullptr));
|
|
|
|
CHECK_EQ(0, notcurses_render(nc_));
|
|
|
|
ncreel_destroy(nr);
|
|
|
|
}
|
|
|
|
|
|
|
|
// check that, without any borders, the tablets are the correct size
|
|
|
|
SUBCASE("NoBordersSize") {
|
|
|
|
ncreel_options r{};
|
|
|
|
r.tabletmask = 0xf;
|
|
|
|
r.bordermask = 0xf;
|
|
|
|
struct ncreel* nr = ncreel_create(n_, &r);
|
|
|
|
REQUIRE(nr);
|
|
|
|
CHECK_EQ(0, notcurses_render(nc_));
|
|
|
|
CHECK(ncreel_validate(nr));
|
|
|
|
REQUIRE(nullptr != ncreel_add(nr, nullptr, nullptr, check_noborders, nullptr));
|
|
|
|
CHECK_EQ(0, notcurses_render(nc_));
|
|
|
|
ncreel_destroy(nr);
|
|
|
|
}
|
|
|
|
|
|
|
|
// check that, without tablet borders (but with reel borders), the tablets
|
|
|
|
// are the correct size
|
|
|
|
SUBCASE("NoTabletBordersSize") {
|
|
|
|
ncreel_options r{};
|
|
|
|
r.tabletmask = 0xf;
|
|
|
|
struct ncreel* nr = ncreel_create(n_, &r);
|
|
|
|
REQUIRE(nr);
|
|
|
|
CHECK_EQ(0, notcurses_render(nc_));
|
|
|
|
CHECK(ncreel_validate(nr));
|
|
|
|
REQUIRE(nullptr != ncreel_add(nr, nullptr, nullptr, check_notborders, nullptr));
|
|
|
|
CHECK_EQ(0, notcurses_render(nc_));
|
|
|
|
ncreel_destroy(nr);
|
|
|
|
}
|
|
|
|
|
|
|
|
// check that, without reel borders (but with tablet borders), the tablets
|
|
|
|
// are the correct size
|
|
|
|
SUBCASE("NoReelBordersSize") {
|
|
|
|
ncreel_options r{};
|
|
|
|
r.bordermask = 0xf;
|
|
|
|
struct ncreel* nr = ncreel_create(n_, &r);
|
|
|
|
REQUIRE(nr);
|
|
|
|
CHECK_EQ(0, notcurses_render(nc_));
|
|
|
|
CHECK(ncreel_validate(nr));
|
|
|
|
REQUIRE(nullptr != ncreel_add(nr, nullptr, nullptr, check_norborders, nullptr));
|
|
|
|
CHECK_EQ(0, notcurses_render(nc_));
|
|
|
|
ncreel_destroy(nr);
|
|
|
|
}
|
|
|
|
|
2020-08-27 16:22:35 +00:00
|
|
|
CHECK(0 == notcurses_stop(nc_));
|
|
|
|
}
|