Issue#1335: Updated tests to exercise variable_011 on procedure calls.

This commit is contained in:
Jukka Hertzog 2024-11-20 11:34:14 +00:00 committed by GitHub
parent 139ec20a15
commit fa85f7929a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 67 additions and 0 deletions

View File

@ -465,3 +465,36 @@ package body pkg_test is
end function function2;
end package body pkg_test;
--=============================================================================
-- Issue #1335 test
--=============================================================================
architecture rtl of test is
procedure my_proc (
signal param1 : integer;
variable param2 : integer
) is
begin
end procedure my_proc;
signal sig1 : integer;
begin
process1 : process is
variable var1 : integer;
begin
my_proc(
param1 => SIG1,
param2 => var1
);
end process process1;
end architecture rtl;

View File

@ -465,3 +465,36 @@ package body pkg_test is
end function function2;
end package body pkg_test;
--=============================================================================
-- Issue #1335 test
--=============================================================================
architecture rtl of test is
procedure my_proc (
signal param1 : integer;
variable param2 : integer
) is
begin
end procedure my_proc;
signal sig1 : integer;
begin
process1 : process is
variable var1 : integer;
begin
my_proc(
param1 => SIG1,
param2 => VAR1
);
end process process1;
end architecture rtl;

View File

@ -44,6 +44,7 @@ class test_rule(unittest.TestCase):
lExpected.extend([287, 287, 287, 287, 290])
lExpected.extend([321, 321, 321, 321, 324])
lExpected.extend([331, 331, 331, 331, 334])
lExpected.extend([495])
oRule.analyze(self.oFile)
self.assertEqual(lExpected, utils.extract_violation_lines_from_violation_object(oRule.violations))