Skip to content

Commit

Permalink
Fixup tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alrz committed Jul 23, 2021
1 parent 4b37712 commit 19d6585
Showing 1 changed file with 28 additions and 24 deletions.
52 changes: 28 additions & 24 deletions src/Compilers/CSharp/Test/Syntax/Parsing/PatternParsingTests2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -364,15 +364,12 @@ public void ExtendedPropertySubpattern_06()
public void ExtendedPropertySubpattern_07()
{
UsingExpression(@"e is { [0]: p }",
// (1,8): error CS1001: Identifier expected
// e is { [0]: p }
Diagnostic(ErrorCode.ERR_IdentifierExpected, "[").WithLocation(1, 8),
// (1,10): error CS1003: Syntax error, ',' expected
// e is { [0]: p }
Diagnostic(ErrorCode.ERR_SyntaxError, "]").WithArguments(",", "]").WithLocation(1, 10),
// (1,13): error CS1003: Syntax error, ',' expected
// e is { [0]: p }
Diagnostic(ErrorCode.ERR_SyntaxError, "p").WithArguments(",", "").WithLocation(1, 13));
// (1,11): error CS1003: Syntax error, ',' expected
// e is { [0]: p }
Diagnostic(ErrorCode.ERR_SyntaxError, ":").WithArguments(",", ":").WithLocation(1, 11),
// (1,13): error CS1003: Syntax error, ',' expected
// e is { [0]: p }
Diagnostic(ErrorCode.ERR_SyntaxError, "p").WithArguments(",", "").WithLocation(1, 13));

N(SyntaxKind.IsPatternExpression);
{
Expand All @@ -388,12 +385,17 @@ public void ExtendedPropertySubpattern_07()
N(SyntaxKind.OpenBraceToken);
N(SyntaxKind.Subpattern);
{
N(SyntaxKind.ConstantPattern);
N(SyntaxKind.ListPattern);
{
N(SyntaxKind.NumericLiteralExpression);
N(SyntaxKind.OpenBracketToken);
N(SyntaxKind.ConstantPattern);
{
N(SyntaxKind.NumericLiteralToken, "0");
N(SyntaxKind.NumericLiteralExpression);
{
N(SyntaxKind.NumericLiteralToken, "0");
}
}
N(SyntaxKind.CloseBracketToken);
}
}
M(SyntaxKind.CommaToken);
Expand Down Expand Up @@ -748,15 +750,12 @@ public void ExtendedPropertySubpattern_13()
public void ExtendedPropertySubpattern_14()
{
UsingExpression(@"e is { [0].b: p }",
// (1,8): error CS1001: Identifier expected
// e is { [0].b: p }
Diagnostic(ErrorCode.ERR_IdentifierExpected, "[").WithLocation(1, 8),
// (1,10): error CS1003: Syntax error, ',' expected
// e is { [0].b: p }
Diagnostic(ErrorCode.ERR_SyntaxError, "]").WithArguments(",", "]").WithLocation(1, 10),
// (1,12): error CS1003: Syntax error, ',' expected
// e is { [0].b: p }
Diagnostic(ErrorCode.ERR_SyntaxError, "b").WithArguments(",", "").WithLocation(1, 12));
// (1,11): error CS1003: Syntax error, ',' expected
// e is { [0].b: p }
Diagnostic(ErrorCode.ERR_SyntaxError, ".").WithArguments(",", ".").WithLocation(1, 11),
// (1,12): error CS1003: Syntax error, ',' expected
// e is { [0].b: p }
Diagnostic(ErrorCode.ERR_SyntaxError, "b").WithArguments(",", "").WithLocation(1, 12));

N(SyntaxKind.IsPatternExpression);
{
Expand All @@ -772,12 +771,17 @@ public void ExtendedPropertySubpattern_14()
N(SyntaxKind.OpenBraceToken);
N(SyntaxKind.Subpattern);
{
N(SyntaxKind.ConstantPattern);
N(SyntaxKind.ListPattern);
{
N(SyntaxKind.NumericLiteralExpression);
N(SyntaxKind.OpenBracketToken);
N(SyntaxKind.ConstantPattern);
{
N(SyntaxKind.NumericLiteralToken, "0");
N(SyntaxKind.NumericLiteralExpression);
{
N(SyntaxKind.NumericLiteralToken, "0");
}
}
N(SyntaxKind.CloseBracketToken);
}
}
M(SyntaxKind.CommaToken);
Expand Down

0 comments on commit 19d6585

Please sign in to comment.