2013-11-01 23 views
1

是否有人知道测试套件或测试新集合类的框架?还是可以有用地改变用途的标准馆藏测试?似乎有很多不变量可以被一般测试。定制Scala集合的测试套件?

如果很重要,我正在研究IndexedSeq及其亲属的实现 - 非链接列表,集合或映射。

回答

1

这不是一个答案,它只是需要太多的评论空间。我从github中检出scala(https://github.com/scala/scala)并试图找到任何测试。不能够找到类似的东西,你问什么,因为我试过find后:

# find test -iname "*collection*" -type f -exec wc -l {} \; 

14 test/files/run/collection-stacks.check 
38 test/files/run/collection-stacks.scala 
64 test/files/run/collection-conversions.scala 
58 test/files/run/unittest_collection.scala 
11 test/files/run/collections-toSelf.scala 
42 test/files/run/collections.check 
125 test/files/run/collection-conversions.check 
119 test/files/run/collections.scala 
59 test/files/scalacheck/CheckCollections.scala 
15 test/files/pos/collections.scala 

正如你可以看到所有这些文件都非常小,所以我不知道测试是:)。

+1

谢谢 - 在https://github.com/scala/scala/tree/master/test/files/scalacheck还有几个额外的集合库测试。据我所知,没有一个是为了重用而设计的,但是它们可以用于不变式挖掘。 –