Kotlintest样品缺少进口声明

在kotlintest站点上“最终”的样本不起作用。 需要进口证明? 需要依赖build.gradle? 编程Kotlin书籍上的示例代码的同样的问题。

Quote:KotlinTest提供了最终的mixin,它给你最终的方法,将重复测试代码,直到它通过,或达到超时。 这是非确定性代码的完美选择。 例如:

import io.kotlintest.specs.ShouldSpec class MyTests : ShouldSpec() { init { should("do something") { eventually(5.seconds) { // code here that should complete in 5 seconds but takes an indetermistic amount of time. } } }