Skip to content

Commit 46e9817

Browse files
committed
added test involving UDT. closes #3727
1 parent 0698482 commit 46e9817

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

RubberduckTests/Inspections/ObjectVariableNotSetInspectionTests.cs

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,12 +295,32 @@ arg1.Add 7
295295

296296
[Test]
297297
[Category("Inspections")]
298-
public void ObjectVariableNotSet_EnumVariable_ReturnsNoResult()
298+
public void ObjectVariableNotSet_UDT_ReturnsNoResult()
299299
{
300300

301301
var expectResultCount = 0;
302302
var input =
303303
@"
304+
Private Type TTest
305+
Foo As Long
306+
Bar As String
307+
End Type
308+
309+
Private Sub TestUDT()
310+
Dim tt As TTest
311+
tt.Foo = 42
312+
End Sub";
313+
AssertInputCodeYieldsExpectedInspectionResultCount(input, expectResultCount);
314+
}
315+
316+
[Test]
317+
[Category("Inspections")]
318+
public void ObjectVariableNotSet_EnumVariable_ReturnsNoResult()
319+
{
320+
321+
var expectResultCount = 0;
322+
var input =
323+
@"
304324
Enum TestEnum
305325
EnumOne
306326
EnumTwo

0 commit comments

Comments
 (0)