Skip to content

Commit

Permalink
Add test case for C# 11 FileKeyword.
Browse files Browse the repository at this point in the history
  • Loading branch information
GitHubPang committed Jan 27, 2023
1 parent 885a089 commit e834c41
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions backend/RossyntBackendIntegrationTest/IntegrationTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,13 @@ public Task CompileFileCSharp11RawStringLiterals() => RunWithHttpClient(async ht
AssertNode(root["Child"]?[0]?["Child"]?[0]?["Child"]?[0]?["Child"]?[1]?["Child"]?[1]?["Child"]?[1]?["Child"]?[0], "SyntaxToken", "SyntaxToken", "InterpolatedMultiLineRawStringStartToken", "$\"\"\"\n", "8,5", false, 0);
});

[Test]
public Task CompileFileCSharp11FileScopedType() => RunWithHttpClient(async httpClient => {
var root = await CompileFile(httpClient, "file class C");
AssertNode(root, "SyntaxNode", "CompilationUnitSyntax", "CompilationUnit", "file class C", "0,12", false, 2);
AssertNode(root["Child"]?[0]?["Child"]?[0], "SyntaxToken", "SyntaxToken", "FileKeyword", "file", "0,4", false, 1);
});

[Test]
public Task GetNodeInfo() => RunWithHttpClient(async httpClient => {
var root = await CompileFile(httpClient, "using");
Expand Down

0 comments on commit e834c41

Please sign in to comment.