private VarTupleSet getValidTupleSet ( RandSeq randSeq , FunctionInputDef inputDef ) { List < Tuple > validTuples = new ArrayList < Tuple > ( ) ; // Get tuple sets required for each specified combiner, ordered for "greedy" processing, i.e. biggest tuples first. // For this purpose, "all permutations" is considered the maximum tuple size, even though in practice it might not be. getCombiners ( ) . stream ( ) . sorted ( byTupleSize_ ) . forEach ( combiner -> validTuples . addAll ( RandSeq . order ( randSeq , combiner . getTuples ( inputDef ) ) ) ) ; // For all input variables that do not belong to a combiner tuple set... List < VarDef > uncombinedVars = IteratorUtils . toList ( IteratorUtils . filteredIterator ( new VarDefIterator ( inputDef ) , this :: isUncombined ) ) ; if ( ! uncombinedVars . isEmpty ( ) ) { // ... add the default tuples. int defaultTupleSize = getDefaultTupleSize ( ) ; int varCount = uncombinedVars . size ( ) ; validTuples . addAll ( RandSeq . order ( randSeq , getUncombinedTuples ( uncombinedVars , Math . min ( varCount , defaultTupleSize < 1 ? varCount : defaultTupleSize ) ) ) ) ; } return new VarTupleSet ( validTuples ) ; }
Returns the all valid input tuples required for generated test cases .