File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -177,7 +177,7 @@ Private Sub TestSub(ByRef testParam As Variant)
177
177
[ Category ( "Inspections" ) ]
178
178
public void ObjectVariableNotSet_GivenVariantVariableAssignedRange_ReturnsNoResult ( )
179
179
{
180
- var expectResultCount = 1 ;
180
+ var expectResultCount = 0 ;
181
181
var input =
182
182
@"
183
183
Private Sub TestSub(ByRef testParam As Variant)
@@ -190,7 +190,7 @@ Private Sub TestSub(ByRef testParam As Variant)
190
190
[ Category ( "Inspections" ) ]
191
191
public void ObjectVariableNotSet_GivenVariantVariableAssignedDeclaredRange_ReturnsNoResult ( )
192
192
{
193
- var expectResultCount = 1 ;
193
+ var expectResultCount = 0 ;
194
194
var input =
195
195
@"
196
196
Private Sub TestSub(ByRef testParam As Variant, target As Range)
Original file line number Diff line number Diff line change @@ -586,21 +586,21 @@ public void ObjectVariableNotSet_IgnoreQuickFixWorks()
586
586
{
587
587
var inputCode =
588
588
@"
589
- Private Sub Workbook_Open ()
589
+ Private Sub DoSomething ()
590
590
591
- Dim target As Range
592
- target = Range(""A1"")
591
+ Dim target As Object
592
+ target = New Object
593
593
594
594
target.Value = ""forgot something?""
595
595
596
596
End Sub" ;
597
597
var expectedCode =
598
598
@"
599
- Private Sub Workbook_Open ()
599
+ Private Sub DoSomething ()
600
600
601
- Dim target As Range
601
+ Dim target As Object
602
602
'@Ignore ObjectVariableNotSet
603
- target = Range(""A1"")
603
+ target = New Object
604
604
605
605
target.Value = ""forgot something?""
606
606
You can’t perform that action at this time.
0 commit comments