EvoSuite / evosuite

EvoSuite - automated generation of JUnit test suites for Java classes
http://www.evosuite.org
GNU Lesser General Public License v3.0
832 stars 341 forks source link

Removing some raw usages of generic types introduced by our previous selftype refactoring. #354

Closed VoglSebastian closed 3 years ago

schweikl commented 3 years ago

BTW, out of curiosity, you probably noticed there's this method getGAFromResult(...) which returns a raw GeneticAlgorithm at the moment. Any chances we could refactor this method as well?

VoglSebastian commented 3 years ago

BTW, out of curiosity, you probably noticed there's this method getGAFromResult(...) which returns a raw GeneticAlgorithm at the moment. Any chances we could refactor this method as well?

getGAFromResult returns a Wildcard type as parameter of GA atm in SystemTestBase, but you probably meant casting it inside that method and returning a GeneticAlgorithm?

I was hesitant to do this, because i wasn't sure if there are any tests that may rely on a GeneticAlgorithm?

VoglSebastian commented 3 years ago

I have made some changes regarding the Method getGAFromResults. f42ccd1 is the commit that makes the changes, the later one only updates the call sites.

schweikl commented 3 years ago

getGAFromResult returns a Wildcard type as parameter of GA atm in SystemTestBase, but you probably meant casting it inside that method and returning a GeneticAlgorithm?

I was hesitant to do this, because i wasn't sure if there are any tests that may rely on a GeneticAlgorithm?

Oh, yes, you are right of course, it currently returns a GeneticAlgorithm<?> but it would be nice to have a GeneticAlgorithm<T> instead. Sorry for the confusion.

schweikl commented 3 years ago

Some of the tests on CircleCI fail, but AFAIK they have been failing way before your MR. So I would be fine with that and happy to merge your changes.

gofraser commented 3 years ago

Looks great, thanks!