Scala 在SBT中执行测试失败的任务依赖项
如果我的测试成功完成,将执行我build.sbt中的以下代码。它播放了一段美妙的小调,告诉我我的测试成功完成了,让我不再像肮脏的哈利一样盯着终端看Scala 在SBT中执行测试失败的任务依赖项,scala,sbt,Scala,Sbt,如果我的测试成功完成,将执行我build.sbt中的以下代码。它播放了一段美妙的小调,告诉我我的测试成功完成了,让我不再像肮脏的哈利一样盯着终端看 test <<= (test in Test) map { result => import java.io.File import javax.sound.sampled._ val clip = AudioSystem.getClip(); val soundfile = new File("success.wa
test <<= (test in Test) map { result =>
import java.io.File
import javax.sound.sampled._
val clip = AudioSystem.getClip();
val soundfile = new File("success.wav")
val inputStream = AudioSystem.getAudioInputStream(soundfile);
clip.open(inputStream);
clip.start();
result
}
测试参见。比如说,
... test in Test mapR {
case Inc(inc: Incomplete) =>
... play failure sound ...
throw inc
case Value(v) =>
... play success sound ...
v
}
看。比如说,
... test in Test mapR {
case Inc(inc: Incomplete) =>
... play failure sound ...
throw inc
case Value(v) =>
... play success sound ...
v
}