I have a custom implementation of the Map interface which does some fancy stuff, like lazy evaluation of functions. the implementation should appear immutable after construction from outside (e.g. no put() and putAll() methods are supported)
I it looks like it works in the most basic conditions. Since it is quite complex, i am sure there must be tons of lurking bugs w.r.t thread safety, irregular order of operations and much more..
Since the contract of the Map interface is well-defined i am sure there must exist a generic test collection which checks corner-cases, thread safety etc.
I have heard that Google Collections runs about 25000 unit tests for their library. Is it possible to download them somewhere?
The Google Collections zip contains their tests. There should be a google-collect-testfw jar in there.
Specifically, there's an abstract test for the general contract of Map.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With