@@ -315,17 +315,16 @@ public void MethodsWithExcludeFromCodeCoverageAttr()
315
315
FunctionExecutor . Run ( async ( string [ ] pathSerialize ) =>
316
316
{
317
317
CoveragePrepareResult coveragePrepareResult =
318
- await TestInstrumentationHelper . Run < MethodsWithExcludeFromCodeCoverageAttr > ( instance =>
318
+ await TestInstrumentationHelper . Run < MethodsWithExcludeFromCodeCoverageAttr > ( async instance =>
319
319
{
320
320
instance . TestLambda ( string . Empty ) ;
321
321
instance . TestLambda ( string . Empty , 1 ) ;
322
322
foreach ( dynamic _ in instance . TestYield ( "abc" ) ) ;
323
323
foreach ( dynamic _ in instance . TestYield ( "abc" , 1 ) ) ;
324
324
instance . TestLocalFunction ( string . Empty ) ;
325
325
instance . TestLocalFunction ( string . Empty , 1 ) ;
326
- ( ( Task ) instance . TestAsyncAwait ( ) ) . ConfigureAwait ( false ) . GetAwaiter ( ) . GetResult ( ) ;
327
- ( ( Task ) instance . TestAsyncAwait ( 1 ) ) . ConfigureAwait ( false ) . GetAwaiter ( ) . GetResult ( ) ;
328
- return Task . CompletedTask ;
326
+ await ( Task ) instance . TestAsyncAwait ( ) ;
327
+ await ( Task ) instance . TestAsyncAwait ( 1 ) ;
329
328
} ,
330
329
persistPrepareResultToFile : pathSerialize [ 0 ] ) ;
331
330
@@ -353,17 +352,16 @@ public void MethodsWithExcludeFromCodeCoverageAttr2()
353
352
FunctionExecutor . Run ( async ( string [ ] pathSerialize ) =>
354
353
{
355
354
CoveragePrepareResult coveragePrepareResult =
356
- await TestInstrumentationHelper . Run < MethodsWithExcludeFromCodeCoverageAttr2 > ( instance =>
355
+ await TestInstrumentationHelper . Run < MethodsWithExcludeFromCodeCoverageAttr2 > ( async instance =>
357
356
{
358
357
instance . TestLambda ( string . Empty ) ;
359
358
instance . TestLambda ( string . Empty , 1 ) ;
360
359
foreach ( dynamic _ in instance . TestYield ( "abc" ) ) ;
361
360
foreach ( dynamic _ in instance . TestYield ( "abc" , 1 ) ) ;
362
361
instance . TestLocalFunction ( string . Empty ) ;
363
362
instance . TestLocalFunction ( string . Empty , 1 ) ;
364
- ( ( Task ) instance . TestAsyncAwait ( ) ) . ConfigureAwait ( false ) . GetAwaiter ( ) . GetResult ( ) ;
365
- ( ( Task ) instance . TestAsyncAwait ( 1 ) ) . ConfigureAwait ( false ) . GetAwaiter ( ) . GetResult ( ) ;
366
- return Task . CompletedTask ;
363
+ await ( Task ) instance . TestAsyncAwait ( ) ;
364
+ await ( Task ) instance . TestAsyncAwait ( 1 ) ;
367
365
} ,
368
366
persistPrepareResultToFile : pathSerialize [ 0 ] ) ;
369
367
0 commit comments