diff --git a/test_regress/t/t_class_unsup_bad.out b/test_regress/t/t_class_unsup_bad.out new file mode 100644 index 000000000..7d5a2eb29 --- /dev/null +++ b/test_regress/t/t_class_unsup_bad.out @@ -0,0 +1,31 @@ +%Error: t/t_class_unsup_bad.v:6: Unsupported: virtual interface +virtual interface vi_t vi; +^~~~~~~ +%Error: t/t_class_unsup_bad.v:7: Unsupported: virtual data type +virtual vi_t vi2; +^~~~~~~ +%Error: t/t_class_unsup_bad.v:12: Unsupported: classes +class C #(parameter P=1); +^~~~~ +%Error: t/t_class_unsup_bad.v:13: Unsupported: class parameters + localparam LOCPAR = 10; + ^ +%Error: t/t_class_unsup_bad.v:16: Unsupported: 'local' class item + local int loc; + ^~~~~ +%Error: t/t_class_unsup_bad.v:24: Unsupported: virtual class member qualifier + virtual function void func_virtual; endfunction + ^~~~~~~ +%Error: t/t_class_unsup_bad.v:25: Unsupported: pure virtual class method + pure virtual function void func_pure_virtual; endfunction + ^~~~ +%Error: t/t_class_unsup_bad.v:25: syntax error, unexpected endfunction + pure virtual function void func_pure_virtual; endfunction + ^~~~~~~~~~~ +%Error: t/t_class_unsup_bad.v:31: Unsupported: virtual classes +virtual class VC; +^~~~~~~ +%Error: t/t_class_unsup_bad.v:31: Unsupported: classes +virtual class VC; + ^~~~~ +%Error: Exiting due to diff --git a/test_regress/t/t_class_unsup_bad.pl b/test_regress/t/t_class_unsup_bad.pl new file mode 100755 index 000000000..49151b6cd --- /dev/null +++ b/test_regress/t/t_class_unsup_bad.pl @@ -0,0 +1,18 @@ +#!/usr/bin/perl +if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; } +# DESCRIPTION: Verilator: Verilog Test driver/expect definition +# +# Copyright 2019 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. + +scenarios(vlt => 1); + +lint( + fails => 1, + expect_filename => $Self->{golden_filename}, + ); + +ok(1); +1; diff --git a/test_regress/t/t_class_unsup_bad.v b/test_regress/t/t_class_unsup_bad.v new file mode 100644 index 000000000..e509c5aa0 --- /dev/null +++ b/test_regress/t/t_class_unsup_bad.v @@ -0,0 +1,35 @@ +// DESCRIPTION: Verilator: Verilog Test module +// +// This file ONLY is placed into the Public Domain, for any use, +// without warranty, 2019 by Wilson Snyder. + +virtual interface vi_t vi; +virtual vi_t vi2; + +typedef class c; +typedef interface class ic; + +class C #(parameter P=1); + localparam LOCPAR = 10; + int imember; + + local int loc; + protected int prot; + + rand int irand; + randc int icrand; + + task classtask; endtask + function int classfunc; endfunction + virtual function void func_virtual; endfunction + pure virtual function void func_pure_virtual; endfunction + automatic function void func_automatic; endfunction + const function void func_const; endfunction + extern task exttask; +endclass + +virtual class VC; +endclass + +module t (/*AUTOARG*/); +endmodule