Skip to content

Commit e601e0e

Browse files
authored
Merge pull request #1549 from microsoft/copilot/fix-code-fix-errors
Fix VSTHRD010 code fix tests failing on transitive diagnostics
2 parents 72e53d5 + 37a8bd9 commit e601e0e

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

test/Microsoft.VisualStudio.Threading.Analyzers.Tests/VSTHRD010MainThreadUsageAnalyzerTests.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,7 @@ static void VerifyOnUIThread() {
285285
ExpectedDiagnostics = { expected },
286286
FixedCode = fix1,
287287
CodeActionIndex = CodeFixIndex.VerifyOnUIThread,
288+
CodeFixTestBehaviors = CodeFixTestBehaviors.SkipLocalDiagnosticCheck,
288289
}.RunAsync();
289290

290291
await new CSVerify.Test
@@ -293,6 +294,7 @@ static void VerifyOnUIThread() {
293294
ExpectedDiagnostics = { expected },
294295
FixedCode = fix2,
295296
CodeActionIndex = CodeFixIndex.ThrowIfNotOnUIThreadIndex1,
297+
CodeFixTestBehaviors = CodeFixTestBehaviors.SkipLocalDiagnosticCheck,
296298
}.RunAsync();
297299
}
298300

@@ -587,6 +589,7 @@ static void VerifyOnUIThread() { }
587589
},
588590
FixedCode = fix,
589591
CodeActionIndex = CodeFixIndex.VerifyOnUIThread,
592+
CodeFixTestBehaviors = CodeFixTestBehaviors.SkipLocalDiagnosticCheck,
590593
}.RunAsync();
591594
}
592595

0 commit comments

Comments
 (0)