Skip to content

Commit 9ee0bf9

Browse files
committed
Make previously inconclusive tests pass or ignored
1 parent 6fbbdba commit 9ee0bf9

File tree

2 files changed

+22
-5
lines changed

2 files changed

+22
-5
lines changed

RubberduckTests/CodeExplorer/CodeExplorerProjectViewModelTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@ public void IsNotFiltered(string filter)
127127
[Category("Code Explorer")]
128128
[TestCase(DeclarationType.Parameter)]
129129
[TestCase(DeclarationType.LineLabel)]
130-
[TestCase(DeclarationType.UnresolvedMember)] // TODO: Inconclusive pending test setup that will actually create one :-/
131-
//[TestCase(DeclarationType.BracketedExpression)] // TODO: This causes a parser error in testing due to no host application.
130+
[TestCase(DeclarationType.UnresolvedMember, Ignore = "Pending test setup that will actually create one")]
131+
[TestCase(DeclarationType.BracketedExpression, Ignore = "This causes a parser error in testing due to no host application.")]
132132
public void TrackedDeclarations_ExcludesNonNodeTypes(DeclarationType excluded)
133133
{
134134
var declarations = CodeExplorerTestSetup.TestProjectOneDeclarations;
@@ -148,7 +148,7 @@ public void TrackedDeclarations_ExcludesNonNodeTypes(DeclarationType excluded)
148148
[Category("Code Explorer")]
149149
[TestCase(DeclarationType.Variable)]
150150
[TestCase(DeclarationType.Control)]
151-
[TestCase(DeclarationType.Constant)] // TODO: Inconclusive pending test setup that will actually create one :-/
151+
[TestCase(DeclarationType.Constant, Ignore = "Pending test setup that will actually create one.")]
152152
public void TrackedDeclarations_ExcludesMemberEnclosedTypes(DeclarationType excluded)
153153
{
154154
var declarations = CodeExplorerTestSetup.TestProjectOneDeclarations;

RubberduckTests/Inspections/ThunderCode/ThunderCodeInspectionTests.cs

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,36 @@ namespace RubberduckTests.Inspections.ThunderCode
1515
public class ThunderCodeInspectionTests
1616
{
1717
[Test]
18+
[Category("Inspections")]
1819
[TestCase(1, "Public Sub foo\u00A0bar()" + @"
1920
End Sub")]
2021
[TestCase(0, @"Public Sub foo()
2122
End Sub")]
22-
[TestCase(0, @"Public Sub foo bar()
23-
End Sub")] // Correctly provokes a parser error
2423
public void NonBreakingSpaceIdentifier_ReturnsResult(int expectedCount, string inputCode)
2524
{
2625
var func = new Func<RubberduckParserState, IInspection>(state =>
2726
new NonBreakingSpaceIdentifierInspection(state));
2827
ThunderCatsGo(func, inputCode, expectedCount);
2928
}
3029

30+
[Test]
31+
[Category("Inspections")]
32+
[TestCase(0, @"Public Sub foo bar()
33+
End Sub")]
34+
public void NonBreakingSpaceIdentifier_IllegalInputCausesParserError(int expectedCount, string inputCode)
35+
{
36+
var vbe = MockVbeBuilder.BuildFromSingleStandardModule(inputCode, out var component);
37+
var parser = MockParser.Create(vbe.Object);
38+
using (var state = parser.State)
39+
{
40+
parser.Parse(new CancellationTokenSource());
41+
var actualStatus = state.Status;
42+
Assert.AreEqual(ParserState.Error, actualStatus);
43+
}
44+
}
45+
46+
47+
3148
[Test]
3249
[TestCase(2, @"Do")]
3350
[TestCase(2, @"Loop")]

0 commit comments

Comments
 (0)