Advertisement
Guest User

Untitled

a guest
Jul 5th, 2014
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // testing Stack
  2. "A Stack" should "pop values in last-in-first-out order" in {
  3.     val stack = new Stack[Int]
  4.     stack.push(1)
  5.     stack.push(2)
  6.     assert(stack.pop() === 2)
  7.     assert(stack.pop() === 1)
  8. }
  9.  
  10. // testing collections
  11. 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