Skip to content

Commit 3df8362

Browse files
committed
added test for nested parens in literal expressions
1 parent d1e71df commit 3df8362

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

RubberduckTests/Grammar/VBAParserTests.cs

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1503,10 +1503,25 @@ End Type
15031503
AssertTree(parseResult.Item1, parseResult.Item2, "//udtMember", matches => matches.Count == 13);
15041504
}
15051505

1506+
1507+
[TestMethod]
1508+
public void TestNestedParensForLiteralExpression()
1509+
{
1510+
//Assert.Inconclusive("See issue #2206");
1511+
const string code = @"
1512+
Sub Test()
1513+
Dim foo As Integer
1514+
foo = ((42) + ((12)))
1515+
End Sub
1516+
";
1517+
var parseResult = Parse(code);
1518+
AssertTree(parseResult.Item1, parseResult.Item2, "//literalExpression", matches => matches.Count == 2);
1519+
}
1520+
15061521
[TestMethod]
15071522
public void TestNestedParensForByValArgument()
15081523
{
1509-
Assert.Inconclusive("See issue #");
1524+
Assert.Inconclusive("See issue #2206");
15101525
const string code = @"
15111526
Sub Test()
15121527
DoSomething (foo), (bar)

0 commit comments

Comments
 (0)