Skip to content

Commit

Permalink
Correct BinaryRankTournamentTest.
Browse files Browse the repository at this point in the history
  • Loading branch information
labrenz committed Aug 12, 2021
1 parent 5b10d7a commit 73d7da2
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import de.uni_passau.fim.se2.litterbox.refactor.refactorings.Refactoring;
import de.uni_passau.fim.se2.litterbox.utils.PropertyLoader;

import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import java.util.Objects;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@

public class BinaryRankTournament<C extends Solution<C>> implements Selection<C> {

public BinaryRankTournament() {
}

/**
* Selects a chromosome to be used as parent for mutation or crossover from the given non-null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ void testSelectionByDistance() {
refactorSequence1.setDistance(2.0);
mockedRandomness.when(() -> Randomness.nextInt(2)).thenReturn(0).thenReturn(1);
RefactorSequence candidate2 = selection.apply(population);
assertNotSame(refactorSequence1, candidate1);
assertEquals(refactorSequence1, candidate1);
assertNotSame(refactorSequence1, candidate2);
assertEquals(refactorSequence1, candidate2);
}

@Test
Expand Down

0 comments on commit 73d7da2

Please sign in to comment.