diff --git a/makefile b/makefile index 6beb20a..8f2bb9e 100644 --- a/makefile +++ b/makefile @@ -36,7 +36,7 @@ $(program_obj_filesobj_files): %.o: %.c # Unit Tests # -------------------------- unitTestsStack: stack.o test_stack.c $(unityfolder)/unity.c - $(CC) $(FLAGS) $^ -o $@ $(unityfolder)/unity.c + $(CC) $(FLAGS) -I$(unityfolder) $^ -o $@ # -------------------------- diff --git a/stack.o b/stack.o new file mode 100644 index 0000000..cbe9f18 Binary files /dev/null and b/stack.o differ diff --git a/test_stack.c b/test_stack.c index ea95ac9..e304ffa 100644 --- a/test_stack.c +++ b/test_stack.c @@ -39,7 +39,7 @@ void test_push_and_top(void) TEST_ASSERT_EQUAL_INT(30, *(int*)top(stack)); - clearStack(&stack); + clearStack(stack); TEST_ASSERT_NULL(stack); } @@ -72,7 +72,7 @@ void test_clearStack(void) stack = push(stack, &x); stack = push(stack, &y); - clearStack(&stack); + clearStack(stack); TEST_ASSERT_NULL(stack); } \ No newline at end of file diff --git a/unitTestsStack.exe b/unitTestsStack.exe new file mode 100644 index 0000000..6109772 Binary files /dev/null and b/unitTestsStack.exe differ