From fa85f7929a99f05abdf205ad40d7f05cecefc794 Mon Sep 17 00:00:00 2001 From: Jukka Hertzog Date: Wed, 20 Nov 2024 11:34:14 +0000 Subject: [PATCH] Issue#1335: Updated tests to exercise variable_011 on procedure calls. --- tests/variable/rule_011_test_input.fixed.vhd | 33 ++++++++++++++++++++ tests/variable/rule_011_test_input.vhd | 33 ++++++++++++++++++++ tests/variable/test_rule_011.py | 1 + 3 files changed, 67 insertions(+) diff --git a/tests/variable/rule_011_test_input.fixed.vhd b/tests/variable/rule_011_test_input.fixed.vhd index ddc6776d..bd3887c7 100644 --- a/tests/variable/rule_011_test_input.fixed.vhd +++ b/tests/variable/rule_011_test_input.fixed.vhd @@ -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; diff --git a/tests/variable/rule_011_test_input.vhd b/tests/variable/rule_011_test_input.vhd index 1d2d8b11..7d5dc347 100644 --- a/tests/variable/rule_011_test_input.vhd +++ b/tests/variable/rule_011_test_input.vhd @@ -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; diff --git a/tests/variable/test_rule_011.py b/tests/variable/test_rule_011.py index 6e644478..6a37a10a 100644 --- a/tests/variable/test_rule_011.py +++ b/tests/variable/test_rule_011.py @@ -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))