summaryrefslogtreecommitdiff
path: root/src/02/05/stack_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/02/05/stack_test.c')
-rw-r--r--src/02/05/stack_test.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/02/05/stack_test.c b/src/02/05/stack_test.c
new file mode 100644
index 0000000..8f1471b
--- /dev/null
+++ b/src/02/05/stack_test.c
@@ -0,0 +1,19 @@
+#include "stack.h"
+#include <cgreen/cgreen.h>
+#include <string.h>
+
+Describe(Stack);
+BeforeEach(Stack) {}
+AfterEach(Stack) {}
+
+Ensure(Stack, when_pushing_an_item_on_to_a_stack) {
+ Stack *stack = stack_init(10);
+
+ assert_that(stack_size(stack), is_equal_to(1));
+}
+
+TestSuite *stack_tests() {
+ TestSuite *suite = create_test_suite();
+ add_test_with_context(suite, Stack, when_pushing_an_item_on_to_a_stack);
+ return suite;
+}