tests for stack class