mirror of
https://github.com/verilator/verilator.git
synced 2025-01-22 14:24:18 +00:00
Tests: Some coverage improvements
This commit is contained in:
parent
76681fd931
commit
a7374e84a2
@ -8,3 +8,23 @@
|
||||
`define BAR(aa,bb) aa bb
|
||||
`FOO
|
||||
`BAR(aa,bb)
|
||||
|
||||
`ifdef FOO
|
||||
`else
|
||||
`endif
|
||||
`ifndef FOO
|
||||
`elsif FOO
|
||||
`endif
|
||||
|
||||
`define STRINGIFY(x) `"x`"
|
||||
`define CONCAT(a, b) a``b
|
||||
`STRINGIFY(x)
|
||||
`CONCAT(x,y)
|
||||
|
||||
`undef FOO
|
||||
|
||||
`undefineall
|
||||
|
||||
`ifdef NEVER
|
||||
`error "should not get"
|
||||
`endif
|
||||
|
4
test_regress/t/t_preproc_inc_fn_bad.out
Normal file
4
test_regress/t/t_preproc_inc_fn_bad.out
Normal file
@ -0,0 +1,4 @@
|
||||
%Error: t/t_preproc_inc_fn_bad.v:7:10: Expecting include filename. Found: ELSE
|
||||
7 | `include `else
|
||||
| ^~~~~
|
||||
%Error: Exiting due to
|
20
test_regress/t/t_preproc_inc_fn_bad.pl
Executable file
20
test_regress/t/t_preproc_inc_fn_bad.pl
Executable 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 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.
|
||||
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
scenarios(vlt => 1);
|
||||
|
||||
lint(
|
||||
fails => 1,
|
||||
# The .vh file has the error, not the .v file
|
||||
expect_filename => $Self->{golden_filename},
|
||||
);
|
||||
|
||||
ok(1);
|
||||
1;
|
10
test_regress/t/t_preproc_inc_fn_bad.v
Normal file
10
test_regress/t/t_preproc_inc_fn_bad.v
Normal file
@ -0,0 +1,10 @@
|
||||
// DESCRIPTION: Verilator: Verilog Test module
|
||||
//
|
||||
// This file ONLY is placed under the Creative Commons Public Domain, for
|
||||
// any use, without warranty, 2010 by Wilson Snyder.
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
`include `else
|
||||
|
||||
module t;
|
||||
endmodule
|
Loading…
Reference in New Issue
Block a user