update tests

This commit is contained in:
Yilou Wang 2025-10-11 23:04:56 +02:00
parent 2e6d056755
commit 5977760443
3 changed files with 9 additions and 11 deletions

View File

@ -1,7 +0,0 @@
%Warning-CONSTRAINTIGN: t/t_std_randomize_unsup_bad.v:11:16: Unsupported: std::randomize()'s 'with'
: ... note: In instance 't'
11 | if (std::randomize(a, b) with { 2 < a; a < 7; b < a; } != 1) $stop;
| ^~~~~~~~~
... For warning description see https://verilator.org/warn/CONSTRAINTIGN?v=latest
... Use "/* verilator lint_off CONSTRAINTIGN */" and lint_on around source to disable this message.
%Error: Exiting due to

View File

@ -9,8 +9,13 @@
import vltest_bootstrap
test.scenarios('linter')
test.scenarios('simulator')
test.lint(fails=True, expect_filename=test.golden_filename)
if not test.have_solver:
test.skip("No constraint solver installed")
test.compile()
test.execute()
test.passes()

View File

@ -1,13 +1,13 @@
// DESCRIPTION: Verilator: Verilog Test module
//
// This file ONLY is placed under the Creative Commons Public Domain, for
// any use, without warranty, 2024 by Antmicro Ltd.
// any use, without warranty, 2025 by PlanV GmbH.
// SPDX-License-Identifier: CC0-1.0
module t;
initial begin
int a, b;
if (std::randomize(a, b) != 1) $stop;
// if (std::randomize(a, b) != 1) $stop;
if (std::randomize(a, b) with { 2 < a; a < 7; b < a; } != 1) $stop;
if (!(2 < a && a < 7 && b < a)) $stop;
$write("-*-* All Finished *-*-\n");