是否可以在 属性 定义的位置指定执行 属性 的次数?
Is it possible to specify at the site of a Property definition how many times to execute the Property?
例如:
class MySpec extends Specification with ScalaCheck { def is = s2"""
MyThing should
do something the right way $x1
"""
def x1 = prop(4 /*times*/) { (...) =>
...
}
}
}
使用setParameters
和minTestsOk
:
class MySpec extends Specification with ScalaCheck { def is = s2"""
MyThing should
do something the right way $x1
"""
def x1 = prop { (...) =>
...
}.set(minTestsOk = 1)
}
}
例如:
class MySpec extends Specification with ScalaCheck { def is = s2"""
MyThing should
do something the right way $x1
"""
def x1 = prop(4 /*times*/) { (...) =>
...
}
}
}
使用setParameters
和minTestsOk
:
class MySpec extends Specification with ScalaCheck { def is = s2"""
MyThing should
do something the right way $x1
"""
def x1 = prop { (...) =>
...
}.set(minTestsOk = 1)
}
}