ncpp: stop() resets _instance, add unit test #538
parent
8e649ebe46
commit
8971bda0c2
@ -0,0 +1,28 @@
|
||||
#include "main.h"
|
||||
|
||||
using namespace ncpp;
|
||||
|
||||
TEST_CASE("Ncpp"
|
||||
* doctest::description("Basic C++ wrapper tests")) {
|
||||
|
||||
// we ought be able to construct a NotCurses object with a nullptr FILE
|
||||
// or even just no argument (decays to nullptr).
|
||||
SUBCASE("ConstructNotCurses") {
|
||||
NotCurses nc;
|
||||
CHECK(nc.stop());
|
||||
}
|
||||
|
||||
SUBCASE("ConstructNotCursesNullFILE") {
|
||||
NotCurses ncnull(nullptr);
|
||||
CHECK(ncnull.stop());
|
||||
}
|
||||
|
||||
// we ought be able to get a new NotCurses object after stop()ping one.
|
||||
SUBCASE("ConstructNotCursesTwice") {
|
||||
NotCurses nc;
|
||||
CHECK(nc.stop());
|
||||
NotCurses ncnull(nullptr);
|
||||
CHECK(ncnull.stop());
|
||||
}
|
||||
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
#include "main.h"
|
||||
|
||||
using namespace ncpp;
|
||||
|
||||
TEST_CASE("Ncpp") {
|
||||
|
||||
// we ought be able to construct a NotCurses object with a nullptr FILE
|
||||
// or even just no argument (decays to nullptr).
|
||||
SUBCASE("ConstructNullFILE") {
|
||||
NotCurses nc;
|
||||
CHECK(nc.stop());
|
||||
NotCurses ncnull(nullptr);
|
||||
CHECK(ncnull.stop());
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue