@@ -104,7 +104,7 @@ public static void Run()
104104 { body }
105105 }}
106106 }}
107- }}" , path : "Driver.cs" ) ;
107+ }}" , path : "Driver.cs" , cancellationToken : TestContext . Current . CancellationToken ) ;
108108
109109 var allTypes = SyntaxTree ( CompilationUnit (
110110 externs : default ,
@@ -131,15 +131,16 @@ public static void Run()
131131
132132 var comp = CSharpCompilation . Create (
133133 Guid . NewGuid ( ) . ToString ( "N" ) ,
134- syntaxTrees : new [ ] { mainTree , allTypes , SyntaxFactory . ParseSyntaxTree ( DeepEquals , path : "DeepEquals.cs" ) } ,
135- references : ( await s_net10Refs . ResolveAsync ( null , default ) ) . Concat ( refs ) ,
134+ syntaxTrees : new [ ] { mainTree , allTypes , SyntaxFactory . ParseSyntaxTree ( DeepEquals , path : "DeepEquals.cs" , cancellationToken : TestContext . Current . CancellationToken ) } ,
135+ references : ( await s_net10Refs . ResolveAsync ( null , TestContext . Current . CancellationToken ) ) . Concat ( refs ) ,
136136 new CSharpCompilationOptions ( OutputKind . DynamicallyLinkedLibrary , generalDiagnosticOption : ReportDiagnostic . Warn ) ) ;
137137
138138 var driver = CSharpGeneratorDriver . Create ( new [ ] { new SerdeImplRoslynGenerator ( ) } ) ;
139139 driver . RunGeneratorsAndUpdateCompilation (
140140 comp ,
141141 out var newComp ,
142- out var diagnostics ) ;
142+ out var diagnostics ,
143+ TestContext . Current . CancellationToken ) ;
143144
144145 Assert . True ( diagnostics . Length == 0 , string . Join ( Environment . NewLine , diagnostics ) ) ;
145146
@@ -150,7 +151,7 @@ public static void Run()
150151 win32Resources : null ,
151152 manifestResources : null ,
152153 options : s_emitOptions ,
153- cancellationToken : default ) ;
154+ cancellationToken : TestContext . Current . CancellationToken ) ;
154155
155156 Assert . True ( result . Success ,
156157 string . Join ( Environment . NewLine , result . Diagnostics ) ) ;
0 commit comments