@@ -28,54 +28,68 @@ def test_rule_025(self):
2828 lExpected = [3 , 10 , 17 , 24 ]
2929 oRule .analyze (self .oFile )
3030 self .assertEqual (lExpected , utils .extract_violation_lines_from_violation_object (oRule .violations ))
31- self .assertEqual ("Architecture identifier must be from this list: " , oRule ._get_solution (None ))
31+ self .assertEqual ("Architecture identifier must match a name from this list: " , oRule ._get_solution (None ))
3232
3333 oRule .violations = []
3434 oRule .names = []
3535 oRule .names .append ("rtl" )
3636 lExpected = [10 , 17 , 24 ]
3737 oRule .analyze (self .oFile )
3838 self .assertEqual (lExpected , utils .extract_violation_lines_from_violation_object (oRule .violations ))
39- self .assertEqual ("Architecture identifier must be from this list: rtl" , oRule ._get_solution (None ))
39+ self .assertEqual ("Architecture identifier must match a name from this list: rtl" , oRule ._get_solution (None ))
4040
4141 oRule .violations = []
4242 oRule .names = ["ENTITY1" ]
4343 lExpected = [3 , 17 , 24 ]
4444 oRule .analyze (self .oFile )
4545 self .assertEqual (lExpected , utils .extract_violation_lines_from_violation_object (oRule .violations ))
46- self .assertEqual ("Architecture identifier must be from this list: ENTITY1" , oRule ._get_solution (None ))
46+ self .assertEqual ("Architecture identifier must match a name from this list: ENTITY1" , oRule ._get_solution (None ))
4747
4848 oRule .violations = []
4949 oRule .names = ["BLUE" ]
5050 lExpected = [3 , 10 , 24 ]
5151 oRule .analyze (self .oFile )
5252 self .assertEqual (lExpected , utils .extract_violation_lines_from_violation_object (oRule .violations ))
53- self .assertEqual ("Architecture identifier must be from this list: BLUE" , oRule ._get_solution (None ))
53+ self .assertEqual ("Architecture identifier must match a name from this list: BLUE" , oRule ._get_solution (None ))
5454
5555 oRule .violations = []
5656 oRule .names = ["CDC" ]
5757 lExpected = [3 , 10 , 17 ]
5858 oRule .analyze (self .oFile )
5959 self .assertEqual (lExpected , utils .extract_violation_lines_from_violation_object (oRule .violations ))
60- self .assertEqual ("Architecture identifier must be from this list: CDC" , oRule ._get_solution (None ))
60+ self .assertEqual ("Architecture identifier must match a name from this list: CDC" , oRule ._get_solution (None ))
6161
6262 oRule .violations = []
6363 oRule .names = ["rtl" , "CDC" ]
6464 lExpected = [10 , 17 ]
6565 oRule .analyze (self .oFile )
6666 self .assertEqual (lExpected , utils .extract_violation_lines_from_violation_object (oRule .violations ))
67- self .assertEqual ("Architecture identifier must be from this list: rtl, CDC" , oRule ._get_solution (None ))
67+ self .assertEqual ("Architecture identifier must match a name from this list: rtl, CDC" , oRule ._get_solution (None ))
6868
6969 oRule .violations = []
7070 oRule .names = ["rtl" , "cdc" , "blue" ]
7171 lExpected = [10 ]
7272 oRule .analyze (self .oFile )
7373 self .assertEqual (lExpected , utils .extract_violation_lines_from_violation_object (oRule .violations ))
74- self .assertEqual ("Architecture identifier must be from this list: rtl, cdc, blue" , oRule ._get_solution (None ))
74+ self .assertEqual ("Architecture identifier must match a name from this list: rtl, cdc, blue" , oRule ._get_solution (None ))
7575
7676 oRule .violations = []
7777 oRule .names = ["rtl" , "cdc" , "blue" , "entity1" ]
7878 lExpected = []
7979 oRule .analyze (self .oFile )
8080 self .assertEqual (lExpected , utils .extract_violation_lines_from_violation_object (oRule .violations ))
81- self .assertEqual ("Architecture identifier must be from this list: rtl, cdc, blue, entity1" , oRule ._get_solution (None ))
81+ self .assertEqual ("Architecture identifier must match a name from this list: rtl, cdc, blue, entity1" , oRule ._get_solution (None ))
82+
83+ oRule .violations = []
84+ oRule .names = [".ntit\w\d" ]
85+ lExpected = [3 , 17 , 24 ]
86+ oRule .analyze (self .oFile )
87+ self .assertEqual (lExpected , utils .extract_violation_lines_from_violation_object (oRule .violations ))
88+ self .assertEqual ("Architecture identifier must match a name from this list: .ntit\w\d" , oRule ._get_solution (None ))
89+
90+ oRule .violations = []
91+ oRule .names = ["\w\w\w" , "b..." , ".ntit\w\d" ]
92+ lExpected = []
93+ oRule .analyze (self .oFile )
94+ self .assertEqual (lExpected , utils .extract_violation_lines_from_violation_object (oRule .violations ))
95+ self .assertEqual ("Architecture identifier must match a name from this list: \w\w\w, b..., .ntit\w\d" , oRule ._get_solution (None ))
0 commit comments