Skip to content

Commit ce2571d

Browse files
committed
made all ignored tests pass. well except the one for #2206.
1 parent 9e80e2d commit ce2571d

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

Rubberduck.Parsing/Symbols/DeclarationSymbolsListener.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,8 @@ private IEnumerable<IAnnotation> FindAnnotations(int line)
165165
/// </remarks>
166166
private void DeclareControlsAsMembers(IVBComponent form)
167167
{
168+
if (form.Controls == null) { return; }
169+
168170
foreach (var control in form.Controls)
169171
{
170172
// The as type declaration should be TextBox, CheckBox, etc. depending on the type.

RubberduckTests/Grammar/ResolverTests.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2124,8 +2124,6 @@ End Sub
21242124
Assert.AreEqual(1, declaration.References.Count());
21252125
}
21262126

2127-
// Ignored because handling forms/hierarchies is an open issue.
2128-
[Ignore]
21292127
[TestMethod]
21302128
public void GivenControlDeclaration_ResolvesUsageInCodeBehind()
21312129
{

RubberduckTests/Mocks/MockUserFormBuilder.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ public Mock<IVBComponent> Build()
6868

6969
var window = new Mock<IWindow>();
7070
window.SetupProperty(w => w.IsVisible, false);
71+
_component.Setup(m => m.Controls).Returns(_vbControls.Object);
7172
_component.Setup(m => m.DesignerWindow()).Returns(window.Object);
7273

7374
return _component;

0 commit comments

Comments
 (0)