Package randoop.generation
Class SmallTestsSequenceSelection
- java.lang.Object
-
- randoop.generation.InputSequenceSelector
-
- randoop.generation.SmallTestsSequenceSelection
-
public class SmallTestsSequenceSelection extends InputSequenceSelector
Select input sequences, favoring shorter sequences. This makes Randoop produce smaller JUnit tests.
-
-
Constructor Summary
Constructors Constructor Description SmallTestsSequenceSelection()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Sequence
selectInputSequence(SimpleList<Sequence> candidates)
Pick a sequence from the candidate list using a weighting that favors shorter sequences.private double
updateWeightMapForCandidates(SimpleList<Sequence> candidates)
Update the weight for any sequence not currently in the map, and compute the total weight.-
Methods inherited from class randoop.generation.InputSequenceSelector
createdExecutableSequence
-
-
-
-
Method Detail
-
selectInputSequence
public Sequence selectInputSequence(SimpleList<Sequence> candidates)
Pick a sequence from the candidate list using a weighting that favors shorter sequences.- Specified by:
selectInputSequence
in classInputSequenceSelector
- Parameters:
candidates
- sequences to choose from- Returns:
- the chosen sequence
-
updateWeightMapForCandidates
private double updateWeightMapForCandidates(SimpleList<Sequence> candidates)
Update the weight for any sequence not currently in the map, and compute the total weight.- Parameters:
candidates
- the elements to compute a weight for- Returns:
- the total weight of all the candidates
-
-