commons-issues mailing list archives

[GitHub] [commons-collections] adwiii opened a new pull request #87: Added additional tests for map classes based on mutation results

Date

Fri, 11 Oct 2019 19:43:57 GMT

adwiii opened a new pull request #87: Added additional tests for map classes based on mutation
results
URL: https://github.com/apache/commons-collections/pull/87
I used this project as a learning tool for getting familiar with [Pitest](http://pitest.org/)
mutation testing and picked a few test classes to improve based on the result. I picked the
below classes because the current test suite provides 100% line coverage, but PIT found surviving
mutants.
### Transformed Map
In the `TransformedMapTest` class, the `testFactory_decorateTransform` method did not provide
a key transformer. In `TransformedMap::transformedMap` the call to `decorated.clear()` is
only necessary if the key transformer changes the key set. This adds a test with a key transformer.
### Lazy Sorted Map and Predicated Map
Both `LazySortedMap` and `PredicatedMap` have tests that check if the comparator is null,
but never check for a non-null value. The added tests check that if a non-null comparator
is used then it is properly returned.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services