Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
Signed-off-by: Ryszard Rozak <[email protected]>
  • Loading branch information
RRozak committed Nov 6, 2024
1 parent 846531e commit da4893a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test_regress/t/t_randomize_queue_size.v
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,14 @@ endclass
class Bar;
rand int q[$];
rand int min_size;
rand int q2[$];
constraint c {
min_size > 2;
q.size() >= min_size;
q.size() < 10;
};
constraint c2 {
q2.size() < 7;
}
endclass

Expand All @@ -48,6 +52,7 @@ module t;
if (foo.q.size() != 15) $stop;

`check_rand(bar, bar.q.size(), bar.q.size() > 2 && bar.q.size() < 10);
`check_rand(bar, bar.q2.size(), bar.q2.size() < 7);
$write("*-* All Finished *-*\n");
$finish;
end
Expand Down

0 comments on commit da4893a

Please sign in to comment.