diff options
| author | mo khan <mo.khan@gmail.com> | 2020-08-05 21:30:37 -0600 |
|---|---|---|
| committer | mo khan <mo.khan@gmail.com> | 2020-08-05 21:30:37 -0600 |
| commit | 97628ebac511e3cb9d19921471bbedf180ba4025 (patch) | |
| tree | 54b5a29bb5f875dd8637de2e98e8d87535a98fa6 /src/02/05/stack_test.c | |
| parent | 8d326c4d934ad821867af1497a14c6445cbe46fe (diff) | |
Start to build a stack
Diffstat (limited to 'src/02/05/stack_test.c')
| -rw-r--r-- | src/02/05/stack_test.c | 19 |
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; +} |
