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

Signed-off-by: Ryszard Rozak <rrozak@antmicro.com>
This commit is contained in:
Ryszard Rozak 2024-10-25 17:06:32 +02:00 committed by GitHub
parent 81ee89de15
commit 87ac61140d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 41 additions and 18 deletions

View File

@ -8,12 +8,15 @@
begin \
longint prev_result; \
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; \
if (!bit'(cl.randomize())) $stop; \
result = longint'(field); \
if (!(cond)) $stop; \
if (i > 0 && result != prev_result) ok = 1; \
if (result != prev_result) ok = 1; \
prev_result = result; \
end \
if (ok != 1) $stop; \

View File

@ -8,12 +8,15 @@
begin \
longint prev_result; \
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; \
if (!bit'(cl.randomize())) $stop; \
result = longint'(field); \
if (!(cond)) $stop; \
if (i > 0 && result != prev_result) ok = 1; \
if (result != prev_result) ok = 1; \
prev_result = result; \
end \
if (ok != 1) $stop; \

View File

@ -8,12 +8,15 @@
begin \
longint prev_result; \
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; \
if (!bit'(cl.randomize())) $stop; \
result = longint'(field); \
if (!(cond)) $stop; \
if (i > 0 && result != prev_result) ok = 1; \
if (result != prev_result) ok = 1; \
prev_result = result; \
end \
if (ok != 1) $stop; \

View File

@ -8,12 +8,15 @@
begin \
longint prev_result; \
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; \
if (!bit'(cl.randomize() with { constr; })) $stop; \
result = longint'(field); \
if (!(cond)) $stop; \
if (i > 0 && result != prev_result) ok = 1; \
if (result != prev_result) ok = 1; \
prev_result = result; \
end \
if (ok != 1) $stop; \

View File

@ -8,11 +8,13 @@
begin \
longint prev_result; \
int ok = 0; \
for (int i = 0; i < 10; i++) begin \
void'(cl.randomize()); \
prev_result = longint'(field); \
repeat(9) begin \
longint result; \
void'(cl.randomize()); \
result = longint'(field); \
if (i > 0 && result != prev_result) ok = 1; \
if (result != prev_result) ok = 1; \
prev_result = result; \
end \
if (ok != 1) $stop; \

View File

@ -8,11 +8,13 @@
begin \
longint prev_result; \
int ok = 0; \
for (int i = 0; i < 10; i++) begin \
void'(cl.randomize()); \
prev_result = longint'(field); \
repeat(9) begin \
longint result; \
void'(cl.randomize()); \
result = longint'(field); \
if (i > 0 && result != prev_result) ok = 1; \
if (result != prev_result) ok = 1; \
prev_result = result; \
end \
if (ok != 1) $stop; \

View File

@ -8,11 +8,13 @@
begin \
longint prev_result; \
int ok = 0; \
for (int i = 0; i < 10; i++) begin \
void'(cl.randomize()); \
prev_result = longint'(field); \
repeat(9) begin \
longint result; \
void'(cl.randomize()); \
result = longint'(field); \
if (i > 0 && result != prev_result) ok = 1; \
if (result != prev_result) ok = 1; \
prev_result = result; \
end \
if (ok != 1) $stop; \

View File

@ -8,11 +8,13 @@
begin \
longint prev_result; \
int ok = 0; \
for (int i = 0; i < 10; i++) begin \
void'(cl.randomize()); \
prev_result = longint'(field); \
repeat(9) begin \
longint result; \
void'(cl.randomize()); \
result = longint'(field); \
if (i > 0 && result != prev_result) ok = 1; \
if (result != prev_result) ok = 1; \
prev_result = result; \
end \
if (ok != 1) $stop; \

View File

@ -8,12 +8,15 @@
begin \
longint prev_result; \
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; \
if (!bit'(cl.randomize())) $stop; \
result = longint'(field); \
if (!(cond)) $stop; \
if (i > 0 && result != prev_result) ok = 1; \
if (result != prev_result) ok = 1; \
prev_result = result; \
end \
if (ok != 1) $stop; \