я пытаюсь запустить простое приложение ScalaTest, чтобы понять, как scala тестирует мой код:
package org.scalatest.examples.flatspec
import org.scalatest.FlatSpec
import collection.mutable.Stack
import org.scalatest._
class ExampleSpec extends FlatSpec with Matchers {
"A Stack" should "pop values in last-in-first-out order" in {
val stack = new Stack[Int]
stack.push(1)
stack.push(2)
stack.pop() should be (2)
stack.pop() should be (1)
}
it should "throw NoSuchElementException if an empty stack is popped" in {
val emptyStack = new Stack[Int]
a [NoSuchElementException] should be thrownBy {
emptyStack.pop()
}
}
}
я также скачал scalatest_2.11-2.2.4.jar. я компилирую файл с помощью команды
scalac -cp scalatest_2.11-2.2.4.jar ExampleSpec.scala
и столкнулся со следующей ошибкой
error while loading package, class file needed by package is missing.
reference value <init>$default$2 of object deprecated refers to nonexisting symbol.