mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-09 17:19:03 -04:00
ncpp unit tests: check get_instance exception #538
This commit is contained in:
parent
f120ab883f
commit
7af027b895
@ -555,7 +555,7 @@ target_include_directories(notcurses-tester
|
||||
)
|
||||
target_link_libraries(notcurses-tester
|
||||
PRIVATE
|
||||
notcurses
|
||||
notcurses++
|
||||
"${TERMINFO_LIBRARIES}"
|
||||
)
|
||||
target_compile_definitions(notcurses-tester
|
||||
|
10
tests/exceptions.cpp
Normal file
10
tests/exceptions.cpp
Normal file
@ -0,0 +1,10 @@
|
||||
#define NCPP_EXCEPTIONS_PLEASE
|
||||
#include "main.h"
|
||||
|
||||
TEST_CASE("Exceptions") {
|
||||
|
||||
SUBCASE("Notcurses") {
|
||||
CHECK_THROWS_AS(ncpp::NotCurses::get_instance(), ncpp::invalid_state_error);
|
||||
}
|
||||
|
||||
}
|
@ -1,6 +1,5 @@
|
||||
#include <array>
|
||||
#include <cstdlib>
|
||||
#include "internal.h"
|
||||
#include "main.h"
|
||||
|
||||
TEST_CASE("Fills") {
|
||||
|
@ -1,4 +1,5 @@
|
||||
#define DOCTEST_CONFIG_IMPLEMENT
|
||||
#include "main.h"
|
||||
#include <term.h>
|
||||
#include <fcntl.h>
|
||||
#include <clocale>
|
||||
@ -9,8 +10,6 @@
|
||||
#include <termios.h>
|
||||
#include <filesystem>
|
||||
#include <langinfo.h>
|
||||
#include "version.h"
|
||||
#include "main.h"
|
||||
|
||||
static const char* datadir = NOTCURSES_SHARE;
|
||||
|
||||
|
@ -2,9 +2,11 @@
|
||||
#define NOTCURSES_TEST_MAIN
|
||||
|
||||
#include <unistd.h>
|
||||
#include <doctest/doctest.h>
|
||||
#include "version.h"
|
||||
#include <doctest/doctest.h>
|
||||
#include <notcurses/notcurses.h>
|
||||
#include <ncpp/NotCurses.hh>
|
||||
#include "internal.h"
|
||||
|
||||
auto find_data(const char* datum) -> char*;
|
||||
auto enforce_utf8() -> bool;
|
||||
|
Loading…
x
Reference in New Issue
Block a user