Add tests for stack.c