Open kadamgreene opened 1 week ago
I think the testing framework will assert that the syntax tree produced after applying the codefix being tested will exactly match what the compiler produces if it would parse the same text.
Hence, your codefix is expected to produce the SyntaxToken exactly as the compiler would parse the text. So I assume somewhere in your codefix, you'are creating a SyntaxToken for @event
and the token doesn't exactly match what the compiler would have produced.
If you use CodeActionValidationMode.None
, does it make your test pass? This is not to say you should use CodeActionValidationMode.None
I'm not sure if this is a problem with the testing framework or the compiler itself...
I have the following code:
The CodeFixProvider generates the method. When I run the code through the CodeFixProvider testing framework. I get this error:
When I trace through the code, I eventually get to the
CodeActionTest<TVerifier>.AssertTokensEqual
and the expectedValue isSyntaxToken IdentifierToken @event
and the actualValue isSyntaxToken IdentifierToken @event
, but when I inspect expectedValue,Value
isevent
, but when I inspect actualValue,Value
is@event
(but both have aText
value of@event
).