@@ -296,19 +296,19 @@ public void TestInstrument_NetStandardAwareAssemblyResolver_FromFolder()
296
296
new [ ] { MetadataReference . CreateFromFile ( typeof ( object ) . Assembly . Location ) } ,
297
297
new CSharpCompilationOptions ( OutputKind . DynamicallyLinkedLibrary ) ) ;
298
298
299
- Assembly newAssemlby ;
299
+ Assembly newAssembly ;
300
300
using ( var dllStream = new MemoryStream ( ) )
301
301
{
302
302
EmitResult emitResult = compilation . Emit ( dllStream , cancellationToken : TestContext . Current . CancellationToken ) ;
303
303
Assert . True ( emitResult . Success ) ;
304
- newAssemlby = Assembly . Load ( dllStream . ToArray ( ) ) ;
304
+ newAssembly = Assembly . Load ( dllStream . ToArray ( ) ) ;
305
305
// remove if exists
306
306
File . Delete ( "netstandard.dll" ) ;
307
307
File . WriteAllBytes ( "netstandard.dll" , dllStream . ToArray ( ) ) ;
308
308
}
309
309
310
- var netstandardResolver = new NetstandardAwareAssemblyResolver ( newAssemlby . Location , _mockLogger . Object ) ;
311
- AssemblyDefinition resolved = netstandardResolver . Resolve ( AssemblyNameReference . Parse ( newAssemlby . FullName ) ) ;
310
+ var netstandardResolver = new NetstandardAwareAssemblyResolver ( newAssembly . Location , _mockLogger . Object ) ;
311
+ AssemblyDefinition resolved = netstandardResolver . Resolve ( AssemblyNameReference . Parse ( newAssembly . FullName ) ) ;
312
312
313
313
// We check if final netstandard.dll resolved is local folder one and not "official" netstandard.dll
314
314
Assert . Equal ( Path . Combine ( Path . GetDirectoryName ( Assembly . GetExecutingAssembly ( ) . Location ) , "netstandard.dll" ) , Path . GetFullPath ( resolved . MainModule . FileName ) ) ;
@@ -398,27 +398,27 @@ public static IEnumerable<object[]> TestInstrument_ExcludedFilesHelper_Data()
398
398
[ MemberData ( nameof ( TestInstrument_ExcludedFilesHelper_Data ) ) ]
399
399
public void TestInstrument_ExcludedFilesHelper ( string [ ] excludeFilterHelper , ValueTuple < string , bool , bool > [ ] result )
400
400
{
401
- var exludeFilterHelper = new ExcludedFilesHelper ( excludeFilterHelper , new Mock < ILogger > ( ) . Object ) ;
401
+ var exclude2FilterHelper = new ExcludedFilesHelper ( excludeFilterHelper , new Mock < ILogger > ( ) . Object ) ;
402
402
foreach ( ValueTuple < string , bool , bool > checkFile in result )
403
403
{
404
404
if ( checkFile . Item3 ) // run test only on windows platform
405
405
{
406
406
if ( RuntimeInformation . IsOSPlatform ( OSPlatform . Windows ) )
407
407
{
408
- Assert . Equal ( checkFile . Item2 , exludeFilterHelper . Exclude ( checkFile . Item1 ) ) ;
408
+ Assert . Equal ( checkFile . Item2 , exclude2FilterHelper . Exclude ( checkFile . Item1 ) ) ;
409
409
}
410
410
}
411
411
else
412
412
{
413
- Assert . Equal ( checkFile . Item2 , exludeFilterHelper . Exclude ( checkFile . Item1 ) ) ;
413
+ Assert . Equal ( checkFile . Item2 , exclude2FilterHelper . Exclude ( checkFile . Item1 ) ) ;
414
414
}
415
415
}
416
416
}
417
417
418
418
[ Fact ]
419
419
public void SkipEmbeddedPdbWithoutLocalSource ( )
420
420
{
421
- string xunitDll = Directory . GetFiles ( Directory . GetCurrentDirectory ( ) , "xunit.core.dll" ) . First ( ) ;
421
+ string xunitDll = Directory . GetFiles ( Directory . GetCurrentDirectory ( ) , "xunit.v3. core.dll" ) . First ( ) ;
422
422
var loggerMock = new Mock < ILogger > ( ) ;
423
423
424
424
var instrumentationHelper =
@@ -552,7 +552,7 @@ public void TestInstrument_AssemblyMarkedAsExcludeFromCodeCoverage(string attrib
552
552
string EmitAssemblyToInstrument ( string outputFolder )
553
553
{
554
554
SyntaxTree attributeClassSyntaxTree = CSharpSyntaxTree . ParseText ( "[System.AttributeUsage(System.AttributeTargets.Assembly)]public class " + attributeName + ":System.Attribute{}" , cancellationToken : TestContext . Current . CancellationToken ) ;
555
- SyntaxTree instrumentableClassSyntaxTree = CSharpSyntaxTree . ParseText ( $@ "
555
+ SyntaxTree instrumentedClassSyntaxTree = CSharpSyntaxTree . ParseText ( $@ "
556
556
[assembly:{ attributeName } ]
557
557
namespace coverlet.tests.projectsample.excludedbyattribute{{
558
558
public class SampleClass
@@ -567,7 +567,7 @@ public int SampleMethod()
567
567
" , cancellationToken : TestContext . Current . CancellationToken ) ;
568
568
CSharpCompilation compilation = CSharpCompilation . Create ( attributeName , new List < SyntaxTree >
569
569
{
570
- attributeClassSyntaxTree , instrumentableClassSyntaxTree
570
+ attributeClassSyntaxTree , instrumentedClassSyntaxTree
571
571
} ) . AddReferences (
572
572
MetadataReference . CreateFromFile ( typeof ( Attribute ) . Assembly . Location ) ) .
573
573
WithOptions ( new CSharpCompilationOptions ( OutputKind . DynamicallyLinkedLibrary , false ) ) ;
@@ -612,9 +612,9 @@ public int SampleMethod()
612
612
var instrumentationHelper =
613
613
new InstrumentationHelper ( new ProcessExitHandler ( ) , new RetryHelper ( ) , new FileSystem ( ) , new Mock < ILogger > ( ) . Object ,
614
614
new SourceRootTranslator ( new Mock < ILogger > ( ) . Object , new FileSystem ( ) ) ) ;
615
- CoverageParameters parametes = new ( ) ;
616
- parametes . ExcludeAttributes = excludedAttributes ;
617
- var instrumenter = new Instrumenter ( excludedbyattributeDll , "_xunit_excludedbyattribute" , parametes , loggerMock . Object , instrumentationHelper , partialMockFileSystem . Object , new SourceRootTranslator ( loggerMock . Object , new FileSystem ( ) ) , new CecilSymbolHelper ( ) ) ;
615
+ CoverageParameters parameters = new ( ) ;
616
+ parameters . ExcludeAttributes = excludedAttributes ;
617
+ var instrumenter = new Instrumenter ( excludedbyattributeDll , "_xunit_excludedbyattribute" , parameters , loggerMock . Object , instrumentationHelper , partialMockFileSystem . Object , new SourceRootTranslator ( loggerMock . Object , new FileSystem ( ) ) , new CecilSymbolHelper ( ) ) ;
618
618
619
619
InstrumenterResult result = instrumenter . Instrument ( ) ;
620
620
Assert . Empty ( result . Documents ) ;
@@ -633,7 +633,7 @@ public void TestInstrument_NetstandardAwareAssemblyResolver_PreserveCompilationC
633
633
[ Fact ]
634
634
public void TestReachabilityHelper ( )
635
635
{
636
- int [ ] allInstrumentableLines =
636
+ int [ ] allInstrumentedLines =
637
637
new [ ]
638
638
{
639
639
// Throws
@@ -680,11 +680,11 @@ public void TestReachabilityHelper()
680
680
143 , 144 ,
681
681
// WithLeave
682
682
163 , 164 ,
683
- // FiltersAndFinallies
683
+ // FiltersAndFinally
684
684
176 , 177 , 183 , 184 , 189 , 190 , 195 , 196 , 197
685
685
} ;
686
686
687
- int [ ] expectedToBeInstrumented = allInstrumentableLines . Except ( notReachableLines ) . ToArray ( ) ;
687
+ int [ ] expectedToBeInstrumented = allInstrumentedLines . Except ( notReachableLines ) . ToArray ( ) ;
688
688
689
689
InstrumenterTest instrumenterTest = CreateInstrumentor ( ) ;
690
690
InstrumenterResult result = instrumenterTest . Instrumenter . Instrument ( ) ;
0 commit comments