Description
Description
We have an instruction called assume
that will remove all the paths from exploration that do not satisfy the given predicate. We use it whenever it is required to create some preconditions to the state.
For example, we use it in preconditionCheck
method in the wrappers to make constraints for their properties. Among other things, we limit their size. It means that we cannot find, i.e., a list, with size greater than our artificial limitation. Therefore, we lose correct branches to improve performance.
The idea is to introduce additional instruction called assumeOrExecuteConcretely
, that will run the MUT concretely from the moment when we encounter contradiction containing the provided assumption. Thus, we'll generate additional branches.
For now, we will generate no tests for the following code:
int bigListFromParameters(List<Integer> list) {
UtMock.assume(list != null && list.size() == 11);
return list.size();
}
Expected behavior
Successfully generated execution with the list containing 11 elements.
Environment
Doesn't matter.
Potential alternatives
Not applicable since it is an additional API.
Context
There is no specific context.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status