Tests: Fix bad result check.

This commit is contained in:
Wilson Snyder 2022-10-15 06:57:12 -04:00
parent 14f58ed6c7
commit 5957156dee
2 changed files with 6 additions and 4 deletions

View File

@ -32,7 +32,7 @@ module t(/*AUTOARG*/);
if (m.num() != 1) $stop;
if (m.try_peek(out) <= 0) $stop;
if (out != 123) $stop;
if (m.num() != 0) $stop;
if (m.num() != 1) $stop;
out = 0;
if (m.try_peek(out) <= 0) $stop;
if (out != 123) $stop;

View File

@ -19,7 +19,11 @@ module t(/*AUTOARG*/);
int msg;
initial begin
s = new(4);
s = new(1);
if (s.try_get() == 0) $stop;
if (s.try_get() != 0) $stop;
s = new(0);
if (s.try_get() != 0) $stop;
s.put();
@ -31,7 +35,6 @@ module t(/*AUTOARG*/);
s.put(2);
if (s.try_get(2) <= 0) $stop;
`ifndef VERILATOR
fork
begin
#10; // So later then get() starts below
@ -44,7 +47,6 @@ module t(/*AUTOARG*/);
s.get();
end
join
`endif
s2 = new;
if (s2.try_get() != 0) $stop;