This is a good question that was asked earlier on SO.
In the original repository, there are collection tests under test/files/scalacheck
and others under test/files/run/*coll*
.
There is no matching test or TCK for custom collections. Integration with collections is usually associated with a specific implementation requirement.
For example, ScalaDoc for immutable.MapLike
tells you to implement get
, iterator
and +
and -
. Theoretically, if you test template methods, you can rely on everything you get for free from the library.
But the document adds:
It is also recommended that you override the foreach and size methods for efficiency.
So, if you don't care, you will also add performance tests. The standard library does not include automatic performance testing.
source share