Я пытаюсь убедиться, что мое свойство ScalaCheck выполняется 500 раз вместо 100 раз по умолчанию. Однако у меня возникают проблемы с настройкой этого.
class BlockSpec extends Properties("BlockSpec") with BitcoinSLogger {
val myParams = Parameters.default.withMinSuccessfulTests(500)
override def overrideParameters(p: Test.Parameters) = myParams
property("Serialization symmetry") =
Prop.forAll(BlockchainElementsGenerator.block) { block =>
logger.warn("Hex:" + block.hex)
Block(block.hex) == block
}
}
Однако, когда я на самом деле запускаю этот тест, он говорит только об успешном прохождении 100 тестов.
РЕДАКТИРОВАТЬ:
$ sbt
[info] Loading project definition from /home/chris/dev/bitcoins-core/project
[info] Set current project to bitcoin-s-core (in build file:/home/chris/dev/bitcoins-core/)
> test-only *BlockSpec*
[info] + BlockSpec.Serialization symmetry: OK, passed 100 tests.
[info] Elapsed time: 1 min 59.775 sec
[info] ScalaCheck
[info] Passed: Total 1, Failed 0, Errors 0, Passed 1
[info] ScalaTest
[info] Run completed in 2 minutes.
[info] Total number of tests run: 0
[info] Suites: completed 0, aborted 0
[info] Tests: succeeded 0, failed 0, canceled 0, ignored 0, pending 0
[info] No tests were executed.
[info] Passed: Total 1, Failed 0, Errors 0, Passed 1
[success] Total time: 123 s, completed Aug 1, 2016 11:36:17 AM
>
Как мне на самом деле передать это моей собственности?
property.check
из REPL? - person jopasserat   schedule 01.08.2016scala> res1._2.check + OK, passed 100 tests.
- person Chris Stewart   schedule 01.08.2016res1._2.check(_.withMinSuccessfulTests(500))
? - person jopasserat   schedule 01.08.2016