Task #5952
closed
Biased distribution over test situations
Added by Alexander Kamkin over 9 years ago.
Updated over 9 years ago.
Assignee:
Andrei Tatarnikov
Published in build:
150605
Description
Similar to biased distributions over operand values.
- % Done changed from 0 to 100
Done in r3813. Example:
class RandomSituationTemplate < MiniMipsBaseTemplate
def run
int32_dist = dist(
range(:value => 0, :bias => 25),
range(:value => 1..2, :bias => 25),
range(:value => 0xffffFFFE..0xffffFFFF, :bias => 50))
sit_dist = dist(
range(:value => situation('add.overflow'), :bias => 20),
range(:value => situation('add.normal'), :bias => 20),
range(:value => situation('zero', :size => 32), :bias => 25),
range(:value => situation('random_biased', :size => 32, :dist => int32_dist), :bias => 35))
10.times {
atomic {
add t1, t2, t3 do random_situation(sit_dist) end
}
}
end
end
- Status changed from New to Resolved
Done in r3813. Example:
class RandomSituationTemplate < MiniMipsBaseTemplate
def run
int32_dist = dist(
range(:value => 0, :bias => 25),
range(:value => 1..2, :bias => 25),
range(:value => 0xffffFFFE..0xffffFFFF, :bias => 50))
sit_dist = dist(
range(:value => situation('add.overflow'), :bias => 20),
range(:value => situation('add.normal'), :bias => 20),
range(:value => situation('zero', :size => 32), :bias => 25),
range(:value => situation('random_biased', :size => 32, :dist => int32_dist), :bias => 35))
10.times {
atomic {
add t1, t2, t3 do random_situation(sit_dist) end
}
}
end
end
- Status changed from Resolved to Closed
- Published in build set to 150605
Also available in: Atom
PDF