File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed
RubberduckTests/Inspections Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -111,6 +111,22 @@ Debug.Print book.Worksheets.Count
111
111
Assert . AreEqual ( expected , actual ) ;
112
112
}
113
113
114
+ [ Test ]
115
+ [ Category ( "Inspections" ) ]
116
+ public void ImplicitActiveWorkbookReference_DimAsTypeWorksheets_NotReported ( )
117
+ {
118
+ const string inputCode =
119
+ @"
120
+ Sub foo()
121
+ Dim allSheets As Worksheets
122
+ End Sub" ;
123
+
124
+ const int expected = 0 ;
125
+ var actual = ArrangeAndGetInspectionCount ( inputCode ) ;
126
+
127
+ Assert . AreEqual ( expected , actual ) ;
128
+ }
129
+
114
130
[ Test ]
115
131
[ Category ( "Inspections" ) ]
116
132
public void ImplicitActiveWorkbookReference_DimAsTypeSheets_NotReported ( )
@@ -127,6 +143,22 @@ Dim allSheets As Sheets
127
143
Assert . AreEqual ( expected , actual ) ;
128
144
}
129
145
146
+ [ Test ]
147
+ [ Category ( "Inspections" ) ]
148
+ public void ImplicitActiveWorkbookReference_DimAsTypeNames_NotReported ( )
149
+ {
150
+ const string inputCode =
151
+ @"
152
+ Sub foo()
153
+ Dim allNames As Names
154
+ End Sub" ;
155
+
156
+ const int expected = 0 ;
157
+ var actual = ArrangeAndGetInspectionCount ( inputCode ) ;
158
+
159
+ Assert . AreEqual ( expected , actual ) ;
160
+ }
161
+
130
162
[ Test ]
131
163
[ Category ( "Inspections" ) ]
132
164
public void ImplicitActiveWorkbookReference_Ignored_DoesNotReportRange ( )
You can’t perform that action at this time.
0 commit comments