@@ -17,11 +17,12 @@ public async Task ExamplesGeneratedCode(CodeFileTheoryData theoryData)
1717 . AddGenerator ( new AutoConstructSourceGenerator ( ) )
1818 . WithAnalyzerOptions ( theoryData . Options )
1919 . Build ( builder . ParseOptions )
20- . RunGenerators ( compilation ) ;
20+ . RunGenerators ( compilation , TestContext . Current . CancellationToken ) ;
2121
2222 await Verify ( driver )
2323 . UseDirectory ( theoryData . VerifiedDirectory )
24- . UseTypeName ( theoryData . Name ) ;
24+ . UseTypeName ( theoryData . Name )
25+ . IgnoreParametersForVerified ( ) ;
2526 }
2627
2728 [ Theory ]
@@ -34,9 +35,9 @@ public async Task CodeCompilesProperly(CodeFileTheoryData theoryData)
3435 . AddGenerator ( new AutoConstructSourceGenerator ( ) )
3536 . WithAnalyzerOptions ( theoryData . Options )
3637 . Build ( builder . ParseOptions )
37- . RunGeneratorsAndUpdateCompilation ( compilation , out var outputCompilation , out _ ) ;
38+ . RunGeneratorsAndUpdateCompilation ( compilation , out var outputCompilation , out _ , TestContext . Current . CancellationToken ) ;
3839
39- Assert . Empty ( outputCompilation . GetDiagnostics ( ) . Where ( d => ! theoryData . IgnoredCompileDiagnostics . Contains ( d . Id ) ) ) ;
40+ Assert . Empty ( outputCompilation . GetDiagnostics ( TestContext . Current . CancellationToken ) . Where ( d => ! theoryData . IgnoredCompileDiagnostics . Contains ( d . Id ) ) ) ;
4041 }
4142
4243#if ROSLYN_4_4
@@ -52,16 +53,17 @@ public async Task EnsureRunsAreCachedCorrectly(CodeFileTheoryData theoryData)
5253 . WithAnalyzerOptions ( theoryData . Options )
5354 . Build ( builder . ParseOptions ) ;
5455
55- driver = driver . RunGenerators ( compilation ) ;
56+ driver = driver . RunGenerators ( compilation , TestContext . Current . CancellationToken ) ;
5657 var firstResult = driver . GetRunResult ( ) ;
5758
5859 // Change the compilation
5960 compilation = compilation . AddSyntaxTrees ( CSharpSyntaxTree . ParseText ( "// dummy" ,
6061 CSharpParseOptions . Default . WithLanguageVersion ( theoryData . LangPreview
6162 ? LanguageVersion . Preview
62- : LanguageVersion . Latest ) ) ) ;
63+ : LanguageVersion . Latest ) ,
64+ cancellationToken : TestContext . Current . CancellationToken ) ) ;
6365
64- driver = driver . RunGenerators ( compilation ) ;
66+ driver = driver . RunGenerators ( compilation , TestContext . Current . CancellationToken ) ;
6567 var secondResult = driver . GetRunResult ( ) ;
6668
6769 AssertRunsEqual ( firstResult , secondResult ,
0 commit comments