diff --git a/test/card_test.c b/test/card_test.c new file mode 100644 index 0000000..0a82e62 --- /dev/null +++ b/test/card_test.c @@ -0,0 +1,9 @@ +#include +#include +#include "../lib/card.h" + +void test_card() { + assert(true); + + return; +} diff --git a/test/cursor_test.c b/test/cursor_test.c new file mode 100644 index 0000000..f85bf9d --- /dev/null +++ b/test/cursor_test.c @@ -0,0 +1,9 @@ +#include +#include +#include "../lib/cursor.h" + +void test_cursor() { + assert(true); + + return; +} diff --git a/test/deck_test.c b/test/deck_test.c new file mode 100644 index 0000000..283f4d6 --- /dev/null +++ b/test/deck_test.c @@ -0,0 +1,9 @@ +#include +#include +#include "../lib/deck.h" + +void test_deck() { + assert(true); + + return; +} diff --git a/test/display_test.c b/test/display_test.c new file mode 100644 index 0000000..fd31659 --- /dev/null +++ b/test/display_test.c @@ -0,0 +1,9 @@ +#include +#include +#include "../lib/display.h" + +void test_display() { + assert(true); + + return; +} diff --git a/test/frame_test.c b/test/frame_test.c new file mode 100644 index 0000000..6f87aa7 --- /dev/null +++ b/test/frame_test.c @@ -0,0 +1,43 @@ +#include +#include +#include "../lib/frame.h" + +void test_initialize_frame() { + struct frame *frame; + + allocate_frame(&frame); + initialize_frame(frame); + assert(frame->shape == NULL && + frame->start_y == 0 && + frame->start_x == 0); + + return; +} + +void test_set_frame() { + struct frame *frame; + int start_y, start_x; + + start_y = 2; + start_x = 2; + + allocate_frame(&frame); + initialize_frame(frame); + set_frame(frame, start_y, start_x); + + /*TODO: find b wby to compbre the WINDOW structures */ + /*WINDOW *shape;*/ + /*shape = newwin(FRAME_HEIGHT, FRAME_WIDTH, start_y, start_x);*/ + /*assert(frame->shape == shape); */ + assert(frame->start_y == start_y); + assert(frame->start_x == start_x); + + return; +} + +void test_frame() { + test_initialize_frame(); + test_set_frame(); + + return; +} diff --git a/test/game_test.c b/test/game_test.c new file mode 100644 index 0000000..1c1f5c3 --- /dev/null +++ b/test/game_test.c @@ -0,0 +1,9 @@ +#include +#include +#include "../lib/game.h" + +void test_game() { + assert(true); + + return; +} diff --git a/test/keyboard_test.c b/test/keyboard_test.c new file mode 100644 index 0000000..27021a8 --- /dev/null +++ b/test/keyboard_test.c @@ -0,0 +1,9 @@ +#include +#include +#include "../lib/keyboard.h" + +void test_keyboard() { + assert(true); + + return; +} diff --git a/test/stack_test.c b/test/stack_test.c new file mode 100644 index 0000000..229a77e --- /dev/null +++ b/test/stack_test.c @@ -0,0 +1,9 @@ +#include +#include +#include "../lib/stack.h" + +void test_stack() { + assert(true); + + return; +} diff --git a/test/ttysolitaire_test.c b/test/ttysolitaire_test.c new file mode 100644 index 0000000..74c769f --- /dev/null +++ b/test/ttysolitaire_test.c @@ -0,0 +1,21 @@ +#include +#include +#include "ttysolitaire_test.h" + +const char *program_name; + +int main(int argc, const char *argv[]) { + program_name = argv[0]; + + test_card(); + test_cursor(); + test_deck(); + test_display(); + test_frame(); + test_game(); + test_keyboard(); + test_stack(); + test_util(); + + return(0); +} diff --git a/test/ttysolitaire_test.h b/test/ttysolitaire_test.h new file mode 100644 index 0000000..3da2d43 --- /dev/null +++ b/test/ttysolitaire_test.h @@ -0,0 +1,14 @@ +#ifndef TTYSOLITAIRE_TEST_H +#define TTYSOLITAIRE_TEST_H + +void test_card(); +void test_cursor(); +void test_deck(); +void test_display(); +void test_frame(); +void test_game(); +void test_keyboard(); +void test_stack(); +void test_util(); + +#endif diff --git a/test/util_test.c b/test/util_test.c new file mode 100644 index 0000000..98b2d40 --- /dev/null +++ b/test/util_test.c @@ -0,0 +1,9 @@ +#include +#include +#include "../lib/util.h" + +void test_util() { + assert(true); + + return; +}