Tests: Don't use indices in check_rand (#5561)

Signed-off-by: Ryszard Rozak <[email protected]>
This commit is contained in:
Ryszard Rozak
2024-10-25 11:06:32 -04:00
committed by GitHub
parent 81ee89de15
commit 87ac61140d
9 changed files with 41 additions and 18 deletions
+5 -2
View File
@@ -8,12 +8,15 @@
begin \ begin \
longint prev_result; \ longint prev_result; \
int ok = 0; \ int ok = 0; \
for (int i = 0; i < 10; i++) begin \ if (!bit'(cl.randomize())) $stop; \
prev_result = longint'(field); \
if (!(cond)) $stop; \
repeat(9) begin \
longint result; \ longint result; \
if (!bit'(cl.randomize())) $stop; \ if (!bit'(cl.randomize())) $stop; \
result = longint'(field); \ result = longint'(field); \
if (!(cond)) $stop; \ if (!(cond)) $stop; \
if (i > 0 && result != prev_result) ok = 1; \ if (result != prev_result) ok = 1; \
prev_result = result; \ prev_result = result; \
end \ end \
if (ok != 1) $stop; \ if (ok != 1) $stop; \
+5 -2
View File
@@ -8,12 +8,15 @@
begin \ begin \
longint prev_result; \ longint prev_result; \
int ok = 0; \ int ok = 0; \
for (int i = 0; i < 10; i++) begin \ if (!bit'(cl.randomize())) $stop; \
prev_result = longint'(field); \
if (!(cond)) $stop; \
repeat(9) begin \
longint result; \ longint result; \
if (!bit'(cl.randomize())) $stop; \ if (!bit'(cl.randomize())) $stop; \
result = longint'(field); \ result = longint'(field); \
if (!(cond)) $stop; \ if (!(cond)) $stop; \
if (i > 0 && result != prev_result) ok = 1; \ if (result != prev_result) ok = 1; \
prev_result = result; \ prev_result = result; \
end \ end \
if (ok != 1) $stop; \ if (ok != 1) $stop; \
+5 -2
View File
@@ -8,12 +8,15 @@
begin \ begin \
longint prev_result; \ longint prev_result; \
int ok = 0; \ int ok = 0; \
for (int i = 0; i < 10; i++) begin \ if (!bit'(cl.randomize())) $stop; \
prev_result = longint'(field); \
if (!(cond)) $stop; \
repeat(9) begin \
longint result; \ longint result; \
if (!bit'(cl.randomize())) $stop; \ if (!bit'(cl.randomize())) $stop; \
result = longint'(field); \ result = longint'(field); \
if (!(cond)) $stop; \ if (!(cond)) $stop; \
if (i > 0 && result != prev_result) ok = 1; \ if (result != prev_result) ok = 1; \
prev_result = result; \ prev_result = result; \
end \ end \
if (ok != 1) $stop; \ if (ok != 1) $stop; \
@@ -8,12 +8,15 @@
begin \ begin \
longint prev_result; \ longint prev_result; \
int ok = 0; \ int ok = 0; \
for (int i = 0; i < 10; i++) begin \ if (!bit'(cl.randomize() with { constr; })) $stop; \
prev_result = longint'(field); \
if (!(cond)) $stop; \
repeat(9) begin \
longint result; \ longint result; \
if (!bit'(cl.randomize() with { constr; })) $stop; \ if (!bit'(cl.randomize() with { constr; })) $stop; \
result = longint'(field); \ result = longint'(field); \
if (!(cond)) $stop; \ if (!(cond)) $stop; \
if (i > 0 && result != prev_result) ok = 1; \ if (result != prev_result) ok = 1; \
prev_result = result; \ prev_result = result; \
end \ end \
if (ok != 1) $stop; \ if (ok != 1) $stop; \
+4 -2
View File
@@ -8,11 +8,13 @@
begin \ begin \
longint prev_result; \ longint prev_result; \
int ok = 0; \ int ok = 0; \
for (int i = 0; i < 10; i++) begin \ void'(cl.randomize()); \
prev_result = longint'(field); \
repeat(9) begin \
longint result; \ longint result; \
void'(cl.randomize()); \ void'(cl.randomize()); \
result = longint'(field); \ result = longint'(field); \
if (i > 0 && result != prev_result) ok = 1; \ if (result != prev_result) ok = 1; \
prev_result = result; \ prev_result = result; \
end \ end \
if (ok != 1) $stop; \ if (ok != 1) $stop; \
@@ -8,11 +8,13 @@
begin \ begin \
longint prev_result; \ longint prev_result; \
int ok = 0; \ int ok = 0; \
for (int i = 0; i < 10; i++) begin \ void'(cl.randomize()); \
prev_result = longint'(field); \
repeat(9) begin \
longint result; \ longint result; \
void'(cl.randomize()); \ void'(cl.randomize()); \
result = longint'(field); \ result = longint'(field); \
if (i > 0 && result != prev_result) ok = 1; \ if (result != prev_result) ok = 1; \
prev_result = result; \ prev_result = result; \
end \ end \
if (ok != 1) $stop; \ if (ok != 1) $stop; \
+4 -2
View File
@@ -8,11 +8,13 @@
begin \ begin \
longint prev_result; \ longint prev_result; \
int ok = 0; \ int ok = 0; \
for (int i = 0; i < 10; i++) begin \ void'(cl.randomize()); \
prev_result = longint'(field); \
repeat(9) begin \
longint result; \ longint result; \
void'(cl.randomize()); \ void'(cl.randomize()); \
result = longint'(field); \ result = longint'(field); \
if (i > 0 && result != prev_result) ok = 1; \ if (result != prev_result) ok = 1; \
prev_result = result; \ prev_result = result; \
end \ end \
if (ok != 1) $stop; \ if (ok != 1) $stop; \
+4 -2
View File
@@ -8,11 +8,13 @@
begin \ begin \
longint prev_result; \ longint prev_result; \
int ok = 0; \ int ok = 0; \
for (int i = 0; i < 10; i++) begin \ void'(cl.randomize()); \
prev_result = longint'(field); \
repeat(9) begin \
longint result; \ longint result; \
void'(cl.randomize()); \ void'(cl.randomize()); \
result = longint'(field); \ result = longint'(field); \
if (i > 0 && result != prev_result) ok = 1; \ if (result != prev_result) ok = 1; \
prev_result = result; \ prev_result = result; \
end \ end \
if (ok != 1) $stop; \ if (ok != 1) $stop; \
@@ -8,12 +8,15 @@
begin \ begin \
longint prev_result; \ longint prev_result; \
int ok = 0; \ int ok = 0; \
for (int i = 0; i < 10; i++) begin \ if (!bit'(cl.randomize())) $stop; \
prev_result = longint'(field); \
if (!(cond)) $stop; \
repeat(9) begin \
longint result; \ longint result; \
if (!bit'(cl.randomize())) $stop; \ if (!bit'(cl.randomize())) $stop; \
result = longint'(field); \ result = longint'(field); \
if (!(cond)) $stop; \ if (!(cond)) $stop; \
if (i > 0 && result != prev_result) ok = 1; \ if (result != prev_result) ok = 1; \
prev_result = result; \ prev_result = result; \
end \ end \
if (ok != 1) $stop; \ if (ok != 1) $stop; \