mirror of
https://github.com/verilator/verilator.git
synced 2025-01-01 04:07:34 +00:00
Tests: Add t_interface_colon_bad (#5281)
This commit is contained in:
parent
7a9140821d
commit
29ad93c89d
7
test_regress/t/t_interface_colon_bad.out
Normal file
7
test_regress/t/t_interface_colon_bad.out
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
%Error: t/t_interface_colon_bad.v:14:7: Package/class for ':: reference' not found: 'iface'
|
||||||
|
14 | iface::func();
|
||||||
|
| ^~~~~
|
||||||
|
%Error: t/t_interface_colon_bad.v:14:14: Can't find definition of task/function: 'func'
|
||||||
|
14 | iface::func();
|
||||||
|
| ^~~~
|
||||||
|
%Error: Exiting due to
|
16
test_regress/t/t_interface_colon_bad.py
Executable file
16
test_regress/t/t_interface_colon_bad.py
Executable file
@ -0,0 +1,16 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||||
|
#
|
||||||
|
# Copyright 2024 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
|
||||||
|
|
||||||
|
import vltest_bootstrap
|
||||||
|
|
||||||
|
test.scenarios('linter')
|
||||||
|
|
||||||
|
test.lint(fails=True, expect_filename=test.golden_filename)
|
||||||
|
|
||||||
|
test.passes()
|
17
test_regress/t/t_interface_colon_bad.v
Normal file
17
test_regress/t/t_interface_colon_bad.v
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
// DESCRIPTION: Verilator: Verilog Test module
|
||||||
|
//
|
||||||
|
// This file ONLY is placed under the Creative Commons Public Domain, for
|
||||||
|
// any use, without warranty, 2024 by Wilson Snyder.
|
||||||
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
|
interface iface;
|
||||||
|
function static func;
|
||||||
|
endfunction
|
||||||
|
endinterface
|
||||||
|
|
||||||
|
module t;
|
||||||
|
initial begin
|
||||||
|
iface::func(); // BAD
|
||||||
|
$stop;
|
||||||
|
end
|
||||||
|
endmodule
|
Loading…
Reference in New Issue
Block a user