Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // testing Stack
- "A Stack" should "pop values in last-in-first-out order" in {
- val stack = new Stack[Int]
- stack.push(1)
- stack.push(2)
- assert(stack.pop() === 2)
- assert(stack.pop() === 1)
- }
- // testing collections
- List(1, 2, 2, 3, 3, 3) should contain theSameElementsAs Vector(3, 2, 3, 1, 2, 3)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement