Skip to content

Commit

Permalink
Fix UTs
Browse files Browse the repository at this point in the history
  • Loading branch information
antonioaversa committed Aug 30, 2023
1 parent 5d91e7b commit 828dd74
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -25,8 +25,9 @@ public static void AssertTokenTypes(string code, bool allowSemanticModel = true,
{
var (tree, model, expectedTokens) = ParseTokens(code, ignoreCompilationErrors);
model = allowSemanticModel ? model : null; // The TokenClassifier will throw if the semantic model is used.
var tokenClassifier = new TokenClassifier(model, false);
var triviaClassifier = new TriviaClassifier();
// filePath for the snippet is defined later by TestHelper.CompileCS -> ignore filePath when classifying tokens and trivia
var tokenClassifier = new TokenClassifier(model, false, string.Empty);
var triviaClassifier = new TriviaClassifier(string.Empty);
expectedTokens.Should().SatisfyRespectively(expectedTokens.Select(
(Func<ExpectedToken, Action<ExpectedToken>>)(_ => token => CheckClassifiedToken(tokenClassifier, triviaClassifier, tree, token))));
}
Expand Down

0 comments on commit 828dd74

Please sign in to comment.