mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-18 03:25:55 +00:00
Exceptions: reenable CHECK_THROWS_AS specifier #538
This commit is contained in:
parent
0ca1716cbd
commit
460ba7683d
@ -3,22 +3,25 @@
|
||||
|
||||
using namespace ncpp;
|
||||
|
||||
TEST_CASE("ExceptionsGetInstance") {
|
||||
CHECK_THROWS_AS(NotCurses::get_instance(), invalid_state_error);
|
||||
}
|
||||
TEST_CASE("Exceptions") {
|
||||
|
||||
TEST_CASE("ResetStats") {
|
||||
NotCurses nc;
|
||||
// FIXME attempts to match invalid_argument have failed thus far :/
|
||||
CHECK_THROWS(nc.reset_stats(nullptr));
|
||||
CHECK(nc.stop());
|
||||
}
|
||||
SUBCASE("GetInstance") {
|
||||
CHECK_THROWS_AS(NotCurses::get_instance(), invalid_state_error);
|
||||
}
|
||||
|
||||
SUBCASE("ResetStats") {
|
||||
NotCurses nc;
|
||||
CHECK_THROWS_AS(nc.reset_stats(nullptr), invalid_argument);
|
||||
CHECK(nc.stop());
|
||||
}
|
||||
|
||||
// ncpp only allows one notcurses object at a time (why?)
|
||||
TEST_CASE("OnlyOneNotCurses") {
|
||||
NotCurses nc;
|
||||
std::unique_ptr<NotCurses> nc2;
|
||||
// FIXME attempts to match ::init_error have failed thus far :/
|
||||
CHECK_THROWS(nc2.reset(new NotCurses()));
|
||||
CHECK(nc.stop());
|
||||
SUBCASE("OnlyOneNotCurses") {
|
||||
NotCurses nc;
|
||||
std::unique_ptr<NotCurses> nc2;
|
||||
// FIXME attempts to match ::init_error have failed thus far :/
|
||||
CHECK_THROWS(nc2.reset(new NotCurses()));
|
||||
CHECK(nc.stop());
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user