@@ -54,8 +54,10 @@ public static async Task AssertRunsEqual(
5454 using var _ = Assert . Multiple ( ) ;
5555
5656 // Both runs should have the same tracked steps
57- await Assert . That ( trackedSteps1 ) . IsNotEmpty ( ) ;
58- await Assert . That ( trackedSteps2 . Keys ) . IsEquivalentTo ( trackedSteps1 . Keys ) ;
57+ await Assert . That ( trackedSteps1 ) . IsNotEmpty ( )
58+ . ConfigureAwait ( false ) ;
59+ await Assert . That ( trackedSteps2 . Keys ) . IsEquivalentTo ( trackedSteps1 . Keys )
60+ . ConfigureAwait ( false ) ;
5961
6062 // Get the IncrementalGeneratorRunStep collection for each run
6163 foreach ( var ( trackingName , runSteps1 ) in trackedSteps1 )
@@ -72,17 +74,18 @@ await AssertStepsEqual(runSteps1, runSteps2)
7274 static Dictionary < string , ImmutableArray < IncrementalGeneratorRunStep > > GetTrackedSteps (
7375 GeneratorDriverRunResult runResult , IEnumerable < string > trackingNames )
7476 => runResult
75- . Results [ 0 ] // We're only running a single generator, so this is safe
76- . TrackedSteps // Get the pipeline outputs
77- . Where ( step => trackingNames . Contains ( step . Key ) ) // filter to known steps
78- . ToDictionary ( x => x . Key , x => x . Value ) ; // Convert to a dictionary
77+ . Results [ 0 ] // We're only running a single generator, so this is safe
78+ . TrackedSteps // Get the pipeline outputs
79+ . Where ( step => trackingNames . Contains ( step . Key ) ) // filter to known steps
80+ . ToDictionary ( x => x . Key , x => x . Value ) ; // Convert to a dictionary
7981 }
8082
8183 private static async Task AssertStepsEqual (
8284 ImmutableArray < IncrementalGeneratorRunStep > runSteps1 ,
8385 ImmutableArray < IncrementalGeneratorRunStep > runSteps2 )
8486 {
85- await Assert . That ( runSteps2 . Length ) . IsEqualTo ( runSteps2 . Length ) ;
87+ await Assert . That ( runSteps2 . Length ) . IsEqualTo ( runSteps2 . Length )
88+ . ConfigureAwait ( false ) ;
8689
8790 for ( var i = 0 ; i < runSteps1 . Length ; i ++ )
8891 {
@@ -93,7 +96,8 @@ private static async Task AssertStepsEqual(
9396 var outputs1 = runStep1 . Outputs . Select ( x => x . Value ) ;
9497 var outputs2 = runStep2 . Outputs . Select ( x => x . Value ) ;
9598
96- await Assert . That ( outputs2 ) . IsEquivalentTo ( outputs1 ) ;
99+ await Assert . That ( outputs2 ) . IsEquivalentTo ( outputs1 )
100+ . ConfigureAwait ( false ) ;
97101
98102 // Therefore, on the second run the results should always be cached or unchanged!
99103 // - Unchanged is when the _input_ has changed, but the output hasn't
@@ -102,7 +106,8 @@ private static async Task AssertStepsEqual(
102106 [ IncrementalStepRunReason . Cached , IncrementalStepRunReason . Unchanged ] ;
103107 foreach ( var ( _, reason ) in runStep2 . Outputs )
104108 {
105- await Assert . That ( reason ) . IsIn ( acceptableReasons ) ;
109+ await Assert . That ( reason ) . IsIn ( acceptableReasons )
110+ . ConfigureAwait ( false ) ;
106111 }
107112 }
108113 }
0 commit comments