Skip to content

Added additional tests for map classes based on mutation results#87

Merged
garydgregory merged 1 commit intoapache:masterfrom
adwiii:master
Oct 12, 2019
Merged

Added additional tests for map classes based on mutation results#87
garydgregory merged 1 commit intoapache:masterfrom
adwiii:master

Conversation

@adwiii
Copy link
Contributor

@adwiii adwiii commented Oct 11, 2019

I used this project as a learning tool for getting familiar with Pitest 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.

@garydgregory garydgregory merged commit bbedeea into apache:master Oct 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants