just the basics

This commit is contained in:
nick black 2019-11-17 09:53:59 -05:00
parent e353fa5536
commit 1fcae27627
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC
4 changed files with 27 additions and 0 deletions

View File

@ -7,6 +7,9 @@ extern "C" {
const char* notcurses_version(void);
int notcurses_init(void);
int notcurses_stop(void);
#ifdef __cplusplus
} // extern "C"
#endif

View File

@ -1,5 +1,12 @@
#include <stdlib.h>
#include <notcurses.h>
int main(void){
if(notcurses_init()){
return EXIT_FAILURE;
}
if(notcurses_stop()){
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
}

View File

@ -9,3 +9,13 @@ static const char NOTCURSES_VERSION[] =
const char* notcurses_version(void){
return NOTCURSES_VERSION;
}
int notcurses_init(void){
int ret = 0;
return ret;
}
int notcurses_stop(void){
int ret = 0;
return ret;
}

7
tests/notcurses.cpp Normal file
View File

@ -0,0 +1,7 @@
#include <notcurses.h>
#include "main.h"
TEST(Notcurses, BasicLifetime) {
ASSERT_EQ(0, notcurses_init());
EXPECT_EQ(0, notcurses_stop());
}