Scala 的 simple-build-tool 似乎没有运行测试
我使用 sbt 创建了一个项目,并对其进行了如下配置:
val scalatest = "org.scala-tools.testing" % "scalatest" % "0.9.5" % "test"
然后,我将 ScalaTest 中的示例粘贴到文件并运行“sbt test”以查看它是否正常工作。文件编译,但测试从未执行。
据我所知,这很简单。我错过了什么吗?
I've used sbt to create a project, configured it thusly:
val scalatest = "org.scala-tools.testing" % "scalatest" % "0.9.5" % "test"
I then pasted the example from ScalaTest into a file and ran "sbt test" to see if it was working. The file compiles, but the test is never executed.
As far as I can tell, this is as simple as it's meant to be. Am I missing something?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
首先,根据他们的网站,我相信 1.0 是正确的版本。我的
project/build/def.scala
看起来像这样:然后执行
sbt update
,然后执行sbt reload
(不确定是否需要重新加载) ,但这并没有什么坏处)现在在
/src/test/scala
中,使用他们的示例,但也导入scala.collection.mutable.Stack
和
sbt test
对我来说效果很好first off, I believe 1.0 is the correct version according to their website. My
project/build/def.scala
looks like this:Then do a
sbt update
, then asbt reload
(not sure the reload is necessary, but it doesn't hurt)Now in
/src/test/scala
, use their example but also importscala.collection.mutable.Stack
and
sbt test
works fine for me