@@ -38,32 +38,6 @@ static class C { }
3838 var range = new LSP . Range { Start = new Position ( 0 , 0 ) , End = new Position ( 2 , 0 ) } ;
3939 var results = await RunGetSemanticTokensRangeAsync ( testLspServer , testLspServer . GetLocations ( "caret" ) . First ( ) , range ) ;
4040
41- // Everything is colorized syntactically, so we shouldn't be returning any semantic results.
42- var expectedResults = new LSP . SemanticTokens
43- {
44- Data = Array . Empty < int > ( )
45- } ;
46-
47- Assert . Equal ( expectedResults . Data , results . Data ) ;
48- }
49-
50- [ Theory , CombinatorialData ]
51- public async Task TestGetSemanticTokensRange_FullDoc_RazorAsync ( bool mutatingLspWorkspace )
52- {
53- // Razor docs should be returning semantic + syntactic reuslts.
54- var markup =
55- @"{|caret:|}// Comment
56- static class C { }
57- " ;
58- await using var testLspServer = await CreateTestLspServerAsync ( markup , mutatingLspWorkspace ) ;
59-
60- var document = testLspServer . GetCurrentSolution ( ) . Projects . First ( ) . Documents . First ( ) ;
61- var range = new LSP . Range { Start = new Position ( 0 , 0 ) , End = new Position ( 2 , 0 ) } ;
62- var options = ClassificationOptions . Default ;
63-
64- var results = await SemanticTokensHelpers . ComputeSemanticTokensDataAsync (
65- document , SemanticTokensHelpers . TokenTypeToIndex , range , options , includeSyntacticClassifications : true , CancellationToken . None ) ;
66-
6741 var expectedResults = new LSP . SemanticTokens
6842 {
6943 Data = new int [ ]
@@ -78,12 +52,12 @@ static class C { }
7852 } ,
7953 } ;
8054
81- await VerifyBasicInvariantsAndNoMultiLineTokens ( testLspServer , results ) . ConfigureAwait ( false ) ;
82- AssertEx . Equal ( ConvertToReadableFormat ( expectedResults . Data ) , ConvertToReadableFormat ( results ) ) ;
55+ await VerifyBasicInvariantsAndNoMultiLineTokens ( testLspServer , results . Data ) . ConfigureAwait ( false ) ;
56+ AssertEx . Equal ( ConvertToReadableFormat ( expectedResults . Data ) , ConvertToReadableFormat ( results . Data ) ) ;
8357 }
8458
8559 [ Theory , CombinatorialData ]
86- public async Task TestGetSemanticTokensRange_PartialDoc_RazorAsync ( bool mutatingLspWorkspace )
60+ public async Task TestGetSemanticTokensRange_PartialDocAsync ( bool mutatingLspWorkspace )
8761 {
8862 // Razor docs should be returning semantic + syntactic reuslts.
8963 var markup =
@@ -96,7 +70,7 @@ static class C { }
9670 var range = new LSP . Range { Start = new Position ( 1 , 0 ) , End = new Position ( 2 , 0 ) } ;
9771 var options = ClassificationOptions . Default ;
9872 var results = await SemanticTokensHelpers . ComputeSemanticTokensDataAsync (
99- document , SemanticTokensHelpers . TokenTypeToIndex , range , options , includeSyntacticClassifications : true , CancellationToken . None ) ;
73+ document , SemanticTokensHelpers . TokenTypeToIndex , range , options , CancellationToken . None ) ;
10074
10175 var expectedResults = new LSP . SemanticTokens
10276 {
@@ -131,7 +105,7 @@ public async Task TestGetSemanticTokensRange_MultiLineComment_IncludeSyntacticCl
131105 var range = new LSP . Range { Start = new Position ( 0 , 0 ) , End = new Position ( 4 , 0 ) } ;
132106 var options = ClassificationOptions . Default ;
133107 var results = await SemanticTokensHelpers . ComputeSemanticTokensDataAsync (
134- document , SemanticTokensHelpers . TokenTypeToIndex , range , options , includeSyntacticClassifications : true , CancellationToken . None ) ;
108+ document , SemanticTokensHelpers . TokenTypeToIndex , range , options , CancellationToken . None ) ;
135109
136110 var expectedResults = new LSP . SemanticTokens
137111 {
@@ -152,39 +126,6 @@ public async Task TestGetSemanticTokensRange_MultiLineComment_IncludeSyntacticCl
152126 AssertEx . Equal ( ConvertToReadableFormat ( expectedResults . Data ) , ConvertToReadableFormat ( results ) ) ;
153127 }
154128
155- [ Theory , CombinatorialData ]
156- public async Task TestGetSemanticTokensRange_StringLiteralAsync ( bool mutatingLspWorkspace )
157- {
158- var markup =
159- @"{|caret:|}class C
160- {
161- void M()
162- {
163- var x = @""one
164- two """"
165- three"";
166- }
167- }
168- " ;
169-
170- await using var testLspServer = await CreateTestLspServerAsync ( markup , mutatingLspWorkspace ) ;
171- var range = new LSP . Range { Start = new Position ( 0 , 0 ) , End = new Position ( 9 , 0 ) } ;
172- var results = await RunGetSemanticTokensRangeAsync ( testLspServer , testLspServer . GetLocations ( "caret" ) . First ( ) , range ) ;
173-
174- var expectedResults = new LSP . SemanticTokens
175- {
176- Data = new int [ ]
177- {
178- // Line | Char | Len | Token type | Modifier
179- 4 , 8 , 3 , SemanticTokensHelpers . TokenTypeToIndex [ ClassificationTypeNames . Keyword ] , 0 , // 'var'
180- 1 , 4 , 2 , SemanticTokensHelpers . TokenTypeToIndex [ ClassificationTypeNames . StringEscapeCharacter ] , 0 , // '""'
181- } ,
182- } ;
183-
184- await VerifyBasicInvariantsAndNoMultiLineTokens ( testLspServer , results . Data ! ) . ConfigureAwait ( false ) ;
185- AssertEx . Equal ( ConvertToReadableFormat ( expectedResults . Data ) , ConvertToReadableFormat ( results . Data ) ) ;
186- }
187-
188129 [ Theory , CombinatorialData ]
189130 public async Task TestGetSemanticTokensRange_StringLiteral_IncludeSyntacticClassificationsAsync ( bool mutatingLspWorkspace )
190131 {
@@ -206,7 +147,7 @@ void M()
206147 var range = new LSP . Range { Start = new Position ( 0 , 0 ) , End = new Position ( 9 , 0 ) } ;
207148 var options = ClassificationOptions . Default ;
208149 var results = await SemanticTokensHelpers . ComputeSemanticTokensDataAsync (
209- document , SemanticTokensHelpers . TokenTypeToIndex , range , options , includeSyntacticClassifications : true , CancellationToken . None ) ;
150+ document , SemanticTokensHelpers . TokenTypeToIndex , range , options , CancellationToken . None ) ;
210151
211152 var expectedResults = new LSP . SemanticTokens
212153 {
@@ -259,7 +200,7 @@ void M()
259200 var range = new LSP . Range { Start = new Position ( 0 , 0 ) , End = new Position ( 9 , 0 ) } ;
260201 var options = ClassificationOptions . Default ;
261202 var results = await SemanticTokensHelpers . ComputeSemanticTokensDataAsync (
262- document , SemanticTokensHelpers . TokenTypeToIndex , range , options , includeSyntacticClassifications : true , CancellationToken . None ) ;
203+ document , SemanticTokensHelpers . TokenTypeToIndex , range , options , CancellationToken . None ) ;
263204
264205 var expectedResults = new LSP . SemanticTokens
265206 {
@@ -326,7 +267,7 @@ void M()
326267 var document = testLspServer . GetCurrentSolution ( ) . Projects . First ( ) . Documents . First ( ) ;
327268 var options = ClassificationOptions . Default ;
328269 var results = await SemanticTokensHelpers . ComputeSemanticTokensDataAsync (
329- document , SemanticTokensHelpers . TokenTypeToIndex , range : null , options , includeSyntacticClassifications : true , CancellationToken . None ) ;
270+ document , SemanticTokensHelpers . TokenTypeToIndex , range : null , options : options , cancellationToken : CancellationToken . None ) ;
330271
331272 var expectedResults = new LSP . SemanticTokens
332273 {
0 commit comments