forked from github/verilator
Internal line coverage fixes
This commit is contained in:
parent
9255707dd4
commit
5dbff89a90
5
test_regress/t/t_array_pattern_bad2.out
Normal file
5
test_regress/t/t_array_pattern_bad2.out
Normal file
@ -0,0 +1,5 @@
|
||||
%Error: t/t_array_pattern_bad2.v:22:16: Multiple '{ default: } clauses
|
||||
: ... In instance t
|
||||
22 | myinfo = '{default: '0,
|
||||
| ^~
|
||||
%Error: Exiting due to
|
19
test_regress/t/t_array_pattern_bad2.pl
Executable file
19
test_regress/t/t_array_pattern_bad2.pl
Executable file
@ -0,0 +1,19 @@
|
||||
#!/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(linter => 1);
|
||||
|
||||
lint(
|
||||
fails => 1,
|
||||
expect_filename => $Self->{golden_filename},
|
||||
);
|
||||
|
||||
ok(1);
|
||||
1;
|
25
test_regress/t/t_array_pattern_bad2.v
Normal file
25
test_regress/t/t_array_pattern_bad2.v
Normal file
@ -0,0 +1,25 @@
|
||||
// DESCRIPTION: Verilator: Verilog Test module
|
||||
//
|
||||
// This file ONLY is placed under the Creative Commons Public Domain, for
|
||||
// any use, without warranty, 2018 by Wilson Snyder.
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
// bug1364
|
||||
|
||||
module t (/*AUTOARG*/
|
||||
// Inputs
|
||||
clk, res
|
||||
);
|
||||
input clk;
|
||||
input res;
|
||||
|
||||
typedef struct packed {
|
||||
logic [3:0] port_num;
|
||||
} info_t;
|
||||
|
||||
info_t myinfo;
|
||||
always_comb
|
||||
myinfo = '{default: '0,
|
||||
default: '1}; // Bad
|
||||
|
||||
endmodule
|
@ -23,6 +23,7 @@ my %Suppressed;
|
||||
foreach my $s (
|
||||
' exited with ', # Is hit; driver.pl filters out
|
||||
'EOF in unterminated string', # Instead get normal unterminated
|
||||
'Enum names without values only allowed on numeric types', # Hard to hit
|
||||
'Enum ranges must be integral, per spec', # Hard to hit
|
||||
'Return with return value isn\'t underneath a function', # Hard to hit, get other bad return messages
|
||||
'Select from non-array ', # Instead get type does not have a bit range
|
||||
@ -32,8 +33,6 @@ foreach my $s (
|
||||
# Not yet analyzed
|
||||
' is not an in/out/inout/param/interface: ',
|
||||
' loading non-variable',
|
||||
'$fopen mode should be <= 4 characters',
|
||||
'\'foreach\' loop variable expects simple variable name',
|
||||
'--pipe-filter protocol error, unexpected: ',
|
||||
'/*verilator sformat*/ can only be applied to last argument of ',
|
||||
'Argument needed for string.',
|
||||
@ -51,7 +50,6 @@ foreach my $s (
|
||||
'Circular logic when ordering code (non-cutable edge loop)',
|
||||
'Deferred assertions must use \'#0\' (IEEE 1800-2017 16.4)',
|
||||
'Define or directive not defined: `',
|
||||
'Enum names without values only allowed on numeric types',
|
||||
'Exceeded limit of ',
|
||||
'Extern declaration\'s scope is not a defined class',
|
||||
'Format to $display-like function must have constant format string',
|
||||
@ -67,7 +65,6 @@ foreach my $s (
|
||||
'Modport item not found: ',
|
||||
'Modport not referenced as <interface>.',
|
||||
'Modport not referenced from underneath an interface: ',
|
||||
'Multiple \'{ default: } clauses',
|
||||
'Non-interface used as an interface: ',
|
||||
'Not marked as function return var',
|
||||
'Parameter not found in sub-module: Param ',
|
||||
@ -88,7 +85,6 @@ foreach my $s (
|
||||
'Unknown `pragma',
|
||||
'Unknown built-in event method ',
|
||||
'Unsized numbers/parameters not allowed in streams.',
|
||||
'Unsupported LHS tristate construct: ',
|
||||
'Unsupported RHS tristate construct: ',
|
||||
'Unsupported or syntax error: Unsized range in instance or other declaration',
|
||||
'Unsupported pullup/down (weak driver) construct.',
|
||||
@ -98,7 +94,6 @@ foreach my $s (
|
||||
'Unsupported/unknown built-in dynamic array method ',
|
||||
'Unsupported: $bits for queue',
|
||||
'Unsupported: $c can\'t generate wider than 64 bits',
|
||||
'Unsupported: --no-structs-packed',
|
||||
'Unsupported: 4-state numbers in this context',
|
||||
'Unsupported: Concatenation to form ',
|
||||
'Unsupported: Non-variable on LHS of built-in method \'',
|
||||
@ -118,6 +113,7 @@ foreach my $s (
|
||||
'Unsupported: no_inline for tasks',
|
||||
'Unsupported: static cast to ',
|
||||
'Unsupported: super',
|
||||
'\'foreach\' loop variable expects simple variable name',
|
||||
) { $Suppressed{$s} = 1; }
|
||||
|
||||
if (!-r "$root/.git") {
|
||||
|
4
test_regress/t/t_sys_fopen_bad.out
Normal file
4
test_regress/t/t_sys_fopen_bad.out
Normal file
@ -0,0 +1,4 @@
|
||||
%Error: t/t_sys_fopen_bad.v:14:34: $fopen mode should be <= 4 characters
|
||||
14 | file = $fopen("/dev/null", "somereallywidebad");
|
||||
| ^~~~~~~~~~~~~~~~~~~
|
||||
%Error: Exiting due to
|
19
test_regress/t/t_sys_fopen_bad.pl
Executable file
19
test_regress/t/t_sys_fopen_bad.pl
Executable file
@ -0,0 +1,19 @@
|
||||
#!/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,
|
||||
expect_filename => $Self->{golden_filename},
|
||||
);
|
||||
|
||||
ok(1);
|
||||
1;
|
17
test_regress/t/t_sys_fopen_bad.v
Normal file
17
test_regress/t/t_sys_fopen_bad.v
Normal file
@ -0,0 +1,17 @@
|
||||
// DESCRIPTION: Verilator: Verilog Test module
|
||||
//
|
||||
// Copyright 2022 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
|
||||
|
||||
module t ();
|
||||
|
||||
integer file;
|
||||
|
||||
initial begin
|
||||
file = $fopen("/dev/null", "somereallywidebad");
|
||||
end
|
||||
|
||||
endmodule
|
Loading…
Reference in New Issue
Block a user