Skip to content

Commit e1d8cad

Browse files
committed
typos
1 parent 348f785 commit e1d8cad

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

test/coverlet.core.tests/Instrumentation/InstrumenterTests.cs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -296,19 +296,19 @@ public void TestInstrument_NetStandardAwareAssemblyResolver_FromFolder()
296296
new[] { MetadataReference.CreateFromFile(typeof(object).Assembly.Location) },
297297
new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary));
298298

299-
Assembly newAssemlby;
299+
Assembly newAssembly;
300300
using (var dllStream = new MemoryStream())
301301
{
302302
EmitResult emitResult = compilation.Emit(dllStream, cancellationToken: TestContext.Current.CancellationToken);
303303
Assert.True(emitResult.Success);
304-
newAssemlby = Assembly.Load(dllStream.ToArray());
304+
newAssembly = Assembly.Load(dllStream.ToArray());
305305
// remove if exists
306306
File.Delete("netstandard.dll");
307307
File.WriteAllBytes("netstandard.dll", dllStream.ToArray());
308308
}
309309

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));
312312

313313
// We check if final netstandard.dll resolved is local folder one and not "official" netstandard.dll
314314
Assert.Equal(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "netstandard.dll"), Path.GetFullPath(resolved.MainModule.FileName));
@@ -398,19 +398,19 @@ public static IEnumerable<object[]> TestInstrument_ExcludedFilesHelper_Data()
398398
[MemberData(nameof(TestInstrument_ExcludedFilesHelper_Data))]
399399
public void TestInstrument_ExcludedFilesHelper(string[] excludeFilterHelper, ValueTuple<string, bool, bool>[] result)
400400
{
401-
var exludeFilterHelper = new ExcludedFilesHelper(excludeFilterHelper, new Mock<ILogger>().Object);
401+
var exclude2FilterHelper = new ExcludedFilesHelper(excludeFilterHelper, new Mock<ILogger>().Object);
402402
foreach (ValueTuple<string, bool, bool> checkFile in result)
403403
{
404404
if (checkFile.Item3) // run test only on windows platform
405405
{
406406
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
407407
{
408-
Assert.Equal(checkFile.Item2, exludeFilterHelper.Exclude(checkFile.Item1));
408+
Assert.Equal(checkFile.Item2, exclude2FilterHelper.Exclude(checkFile.Item1));
409409
}
410410
}
411411
else
412412
{
413-
Assert.Equal(checkFile.Item2, exludeFilterHelper.Exclude(checkFile.Item1));
413+
Assert.Equal(checkFile.Item2, exclude2FilterHelper.Exclude(checkFile.Item1));
414414
}
415415
}
416416
}
@@ -552,7 +552,7 @@ public void TestInstrument_AssemblyMarkedAsExcludeFromCodeCoverage(string attrib
552552
string EmitAssemblyToInstrument(string outputFolder)
553553
{
554554
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($@"
556556
[assembly:{attributeName}]
557557
namespace coverlet.tests.projectsample.excludedbyattribute{{
558558
public class SampleClass
@@ -567,7 +567,7 @@ public int SampleMethod()
567567
", cancellationToken: TestContext.Current.CancellationToken);
568568
CSharpCompilation compilation = CSharpCompilation.Create(attributeName, new List<SyntaxTree>
569569
{
570-
attributeClassSyntaxTree,instrumentableClassSyntaxTree
570+
attributeClassSyntaxTree,instrumentedClassSyntaxTree
571571
}).AddReferences(
572572
MetadataReference.CreateFromFile(typeof(Attribute).Assembly.Location)).
573573
WithOptions(new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary, false));
@@ -612,9 +612,9 @@ public int SampleMethod()
612612
var instrumentationHelper =
613613
new InstrumentationHelper(new ProcessExitHandler(), new RetryHelper(), new FileSystem(), new Mock<ILogger>().Object,
614614
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());
618618

619619
InstrumenterResult result = instrumenter.Instrument();
620620
Assert.Empty(result.Documents);
@@ -633,7 +633,7 @@ public void TestInstrument_NetstandardAwareAssemblyResolver_PreserveCompilationC
633633
[Fact]
634634
public void TestReachabilityHelper()
635635
{
636-
int[] allInstrumentableLines =
636+
int[] allInstrumentedLines =
637637
new[]
638638
{
639639
// Throws
@@ -680,11 +680,11 @@ public void TestReachabilityHelper()
680680
143, 144,
681681
// WithLeave
682682
163, 164,
683-
// FiltersAndFinallies
683+
// FiltersAndFinally
684684
176, 177, 183, 184, 189, 190, 195, 196, 197
685685
};
686686

687-
int[] expectedToBeInstrumented = allInstrumentableLines.Except(notReachableLines).ToArray();
687+
int[] expectedToBeInstrumented = allInstrumentedLines.Except(notReachableLines).ToArray();
688688

689689
InstrumenterTest instrumenterTest = CreateInstrumentor();
690690
InstrumenterResult result = instrumenterTest.Instrumenter.Instrument();

test/coverlet.integration.tests/Collectors.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ private ClonedTemplateProject PrepareTemplateProject()
6565

6666
ClonedTemplateProject clonedTemplateProject = CloneTemplateProject(testSDKVersion: TestSDKVersion);
6767
UpdateNugetConfigWithLocalPackageFolder(clonedTemplateProject.ProjectRootPath!);
68-
AddCoverletCollectosRef(clonedTemplateProject.ProjectRootPath!);
68+
AddCoverletCollectorsRef(clonedTemplateProject.ProjectRootPath!);
6969
return clonedTemplateProject;
7070
}
7171

0 commit comments

Comments
 (0)