Tests: Add incomplete type definition test (#4230)

This commit is contained in:
Aleksander Kiryk
2023-05-25 14:06:37 -04:00
committed by GitHub
parent 8303938d0e
commit 42beaf467c
3 changed files with 35 additions and 0 deletions
+4
View File
@@ -0,0 +1,4 @@
%Error: t/t_no_typedef_bad.v:10:4: Can't find typedef: 'sometype'
10 | sometype p;
| ^~~~~~~~
%Error: Exiting due to
+20
View File
@@ -0,0 +1,20 @@
#!/usr/bin/env perl
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
#
# Copyright 2023 by Wilson Snyder. This program is free software; you
# can redistribute it and/or modify it under the terms of either the GNU
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
scenarios(vlt => 1);
lint(
verilator_flags2 => ["--xml-only"],
fails => 1,
expect_filename => $Self->{golden_filename},
);
ok(1);
1;
+11
View File
@@ -0,0 +1,11 @@
// DESCRIPTION: Verilator: Verilog Test module
//
// This file ONLY is placed under the Creative Commons Public Domain, for
// any use, without warranty, 2023 by Antmicro Ltd.
// SPDX-License-Identifier: CC0-1.0
typedef sometype;
module t(/*AUTOARG*/);
sometype p;
endmodule