Tests: Cleanup some type tests

This commit is contained in:
Wilson Snyder 2025-05-17 21:09:05 -04:00
parent 3b632739a8
commit 19be36dbcb
6 changed files with 14 additions and 7 deletions

View File

@ -1,4 +1,4 @@
%Error: t/t_class_scope_import.v:11:14: Import statement directly within a class scope is illegal %Error: t/t_class_scope_import_bad.v:11:14: Import statement directly within a class scope is illegal
11 | import pkg::*; 11 | import pkg::*;
| ^~ | ^~
... See the manual at https://verilator.org/verilator_doc.html?v=latest for more assistance. ... See the manual at https://verilator.org/verilator_doc.html?v=latest for more assistance.

View File

@ -1,5 +1,5 @@
%Error: t/t_lint_implicit_type_bad.v:11:11: syntax error, unexpected IDENTIFIER-for-type %Error: t/t_lint_implicit_type_bad.v:15:11: syntax error, unexpected IDENTIFIER-for-type
11 | assign imp_type_conflict = 1'b1; 15 | assign imp_typedef_conflict = 1'b1;
| ^~~~~~~~~~~~~~~~~ | ^~~~~~~~~~~~~~~~~~~~
... See the manual at https://verilator.org/verilator_doc.html?v=latest for more assistance. ... See the manual at https://verilator.org/verilator_doc.html?v=latest for more assistance.
%Error: Exiting due to %Error: Exiting due to

View File

@ -11,7 +11,8 @@ import vltest_bootstrap
test.scenarios('vlt') test.scenarios('vlt')
test.lint(verilator_flags2=["--lint-only -Wall -Wno-DECLFILENAME"], # --debug-check adds extra internal message, otherwise golden log would vary
test.lint(verilator_flags2=["--lint-only --debug-check -Wall -Wno-DECLFILENAME"],
fails=True, fails=True,
expect_filename=test.golden_filename) expect_filename=test.golden_filename)

View File

@ -4,9 +4,15 @@
// any use, without warranty, 2024 by Wilson Snyder. // any use, without warranty, 2024 by Wilson Snyder.
// SPDX-License-Identifier: CC0-1.0 // SPDX-License-Identifier: CC0-1.0
class imp_Cls_conflict;
endclass
module t; module t;
typedef int imp_type_conflict; typedef int imp_typedef_conflict;
localparam type imp_PARAM_conflict;
`default_nettype wire `default_nettype wire
assign imp_type_conflict = 1'b1; assign imp_typedef_conflict = 1'b1;
assign imp_Cls_conflict = 1'b1;
assign imp_PARAM_conflict = 1'b1;
endmodule endmodule