Tests: Add t_var_rsvd_port test

This commit is contained in:
Wilson Snyder 2010-01-20 18:29:58 -05:00
parent 6196cf09ff
commit 24753c8c6a
3 changed files with 25 additions and 4 deletions

View File

@ -7,11 +7,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
top_filename("t/t_var_rsvd_port.v");
compile (
fails=>$Self->{v3},
expect=>
q{%Error-SYMRSVDWORD: t/t_var_rsvd_bad.v:\d+: Symbol matches C\+\+ common word: 'bool'
%Error-SYMRSVDWORD: t/t_var_rsvd_bad.v:\d+: Symbol matches C\+\+ reserved word: 'switch'
q{%Error-SYMRSVDWORD: t/t_var_rsvd_port.v:\d+: Symbol matches C\+\+ common word: 'bool'
%Error-SYMRSVDWORD: t/t_var_rsvd_port.v:\d+: Symbol matches C\+\+ reserved word: 'switch'
%Error: Exiting due to.*},
);

View File

@ -0,0 +1,17 @@
#!/usr/bin/perl
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
#
# Copyright 2003 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.
compile (
verilator_flags2=>["-Wno-SYMRSVDWORD"],
);
execute();
ok(1);
1;

View File

@ -13,6 +13,8 @@ module t (/*AUTOARG*/
reg vector; // OK, as not public
reg switch /*verilator public*/; // Bad
initial $stop;
initial begin
$write("*-* All Finished *-*\n");
$finish;
end
endmodule