i trying use scalatest, intellij cannot recognize:
import org.scalatest._ here build.sbt file, located in same directory scalatest.jar file.
scalaversion := "2.11.2" librarydependencies += "org.scalatest" % "scalatest_2.11" % "2.2.4" % "test" thanks
so have convention 2 source folders:
src/main/scala/... src/test/scala/... the first shown blue, second green in intellij idea. library dependencies in sbt associated either of these, so
"org.foo" % "bar_2.11" % "1.2.3" is main dependency, available main sources (and test, because test depends on main). and
"org.foo" % "bar_2.11" % "1.2.3" % "test" is test dependency, available test sources. idea these libraries not required product, run unit tests.
in example, scala-test available test sources, trying import main sources fail.
Comments
Post a Comment