I have comp_value
that gets values between 1 .. 100
.
In addition I have an input variable period
(of the same range). I need to cover 2 ranges of comp_values
: [1..period]
and [period+1 .. 100]
. Something like this:
cover some_event_e is {
item period using no_collect;
item comp_val using no_collect,
ranges = {
range([1..period], "Smaller_than_period");
range([period+1..100], "Bigger_than_period");
};
};
(The code causes compilation error since no variable can be written inside range). Is there a way to collect the coverage? Thank you for your help.
Ranges must be constant.
But if I understood your intent correctly, you can define new items like
Assuming period is always in [1..100].