RosettaCodeData/Task/Stack/Scala/stack-3.scala
Ingy döt Net 776bba907c Sync
2013-10-27 22:24:23 +00:00

13 lines
356 B
Scala

object StackTest extends App {
val stack = new Stack[String]
stack.push("Peter Pan")
stack.push("Suske & Wiske", "Alice in Wonderland")
assert(stack.peek == "Alice in Wonderland")
assert(stack.pop() == "Alice in Wonderland")
assert(stack.pop() == "Suske & Wiske")
assert(stack.pop() == "Peter Pan")
println("Completed without errors")
}