Skip to content

Commit

Permalink
Use net35 (EOL in 2029) instead of net40 (EOL in 2016)
Browse files Browse the repository at this point in the history
  • Loading branch information
jnm2 committed Oct 9, 2021
1 parent 29fe4d3 commit 2165b7f
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions test/Microsoft.Windows.CsWin32.Tests/GeneratorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@ public GeneratorTests(ITestOutputHelper logger)
public static IEnumerable<object[]> TFMData =>
new object[][]
{
new object[] { "net40" },
new object[] { "net35" },
new object[] { "netstandard2.0" },
new object[] { "net5.0" },
};

public async Task InitializeAsync()
{
this.starterCompilations.Add("net40", await this.CreateCompilationAsync(MyReferenceAssemblies.NetFramework.Net40));
this.starterCompilations.Add("net35", await this.CreateCompilationAsync(MyReferenceAssemblies.NetFramework.Net35));
this.starterCompilations.Add("netstandard2.0", await this.CreateCompilationAsync(MyReferenceAssemblies.NetStandard20));
this.starterCompilations.Add("net5.0", await this.CreateCompilationAsync(MyReferenceAssemblies.Net.Net50));
this.starterCompilations.Add("net5.0-x86", await this.CreateCompilationAsync(MyReferenceAssemblies.Net.Net50, Platform.X86));
Expand Down Expand Up @@ -112,7 +112,7 @@ public void SimplestMethod(string tfm)
Assert.DoesNotContain(generatedMethod.AttributeLists, al => IsAttributePresent(al, "SupportedOSPlatform"));
}

if (tfm != "net40")
if (tfm != "net35")
{
Assert.Contains(generatedMethod.AttributeLists, al => IsAttributePresent(al, "DefaultDllImportSearchPaths"));
}
Expand Down Expand Up @@ -814,9 +814,9 @@ public void SynthesizedTypesCanBeDirectlyRequested(string synthesizedTypeName)
[InlineData("PCSTR")]
[InlineData("PCWSTR")]
[InlineData("PWSTR")]
public async Task SynthesizedTypesWorkInNet35(string synthesizedTypeName)
public void SynthesizedTypesWorkInNet35(string synthesizedTypeName)
{
this.compilation = await this.CreateCompilationAsync(MyReferenceAssemblies.NetFramework.Net35);
this.compilation = this.starterCompilations["net35"];
this.generator = this.CreateGenerator();

Assert.True(this.generator.TryGenerate(synthesizedTypeName, CancellationToken.None));
Expand Down Expand Up @@ -2463,8 +2463,6 @@ private static class MyReferenceAssemblies
internal static class NetFramework
{
internal static readonly ReferenceAssemblies Net35 = ReferenceAssemblies.NetFramework.Net35.Default.AddPackages(AdditionalPackages);

internal static readonly ReferenceAssemblies Net40 = ReferenceAssemblies.NetFramework.Net40.Default.AddPackages(AdditionalPackages);
}

internal static class Net
Expand Down

0 comments on commit 2165b7f

Please sign in to comment.