mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-08 01:10:23 +00:00
24 lines
500 B
C++
24 lines
500 B
C++
#define NCPP_EXCEPTIONS_PLEASE
|
|
#include "main.h"
|
|
#include <memory>
|
|
|
|
using namespace ncpp;
|
|
|
|
TEST_CASE("Exceptions") {
|
|
|
|
notcurses_options nopts{};
|
|
nopts.flags = NCOPTION_SUPPRESS_BANNERS |
|
|
NCOPTION_INHIBIT_SETLOCALE;
|
|
nopts.loglevel = NCLOGLEVEL_VERBOSE;
|
|
|
|
SUBCASE("GetInstance") {
|
|
CHECK_THROWS_AS(NotCurses::get_instance(), invalid_state_error);
|
|
}
|
|
|
|
SUBCASE("ResetStats") {
|
|
NotCurses nc{ nopts };
|
|
CHECK_THROWS_AS(nc.reset_stats(nullptr), invalid_argument);
|
|
}
|
|
|
|
}
|