mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-10-31 15:20:13 +00:00
[tests] unit test for directmode image rendering
This commit is contained in:
parent
828cce634a
commit
6f4a9e089c
@ -49,13 +49,27 @@ TEST_CASE("DirectMode") {
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef NOTCURSES_USE_MULTIMEDIA
|
||||
SUBCASE("VisualDisabled"){
|
||||
CHECK(!ncdirect_canopen_images(nc_));
|
||||
}
|
||||
#else
|
||||
SUBCASE("ImagesEnabled"){
|
||||
CHECK(ncdirect_canopen_images(nc_));
|
||||
}
|
||||
|
||||
SUBCASE("LoadImage") {
|
||||
CHECK(0 == ncdirect_render_image(nc_, find_data("changes.jpg"), NCALIGN_LEFT, NCBLIT_1x1, NCSCALE_STRETCH));
|
||||
}
|
||||
#endif
|
||||
|
||||
CHECK(0 == ncdirect_stop(nc_));
|
||||
|
||||
// make sure that we can pass undefined flags and still create the ncdirect
|
||||
SUBCASE("FutureFlags") {
|
||||
nc_ = ncdirect_init(NULL, stdout, ~0ULL);
|
||||
REQUIRE(nullptr != nc_);
|
||||
CHECK(0 == ncdirect_stop(nc_));
|
||||
auto fnc = ncdirect_init(NULL, stdout, ~0ULL);
|
||||
REQUIRE(nullptr != fnc);
|
||||
CHECK(0 == ncdirect_stop(fnc));
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user