Skip to content

Commit c3ba7ea

Browse files
committed
drop target framework net6.0 from tests
1 parent 3b7f33e commit c3ba7ea

File tree

17 files changed

+45
-111
lines changed

17 files changed

+45
-111
lines changed

tests/Smdn.Reflection.ReverseGenerating.ListApi.Core/Smdn.Reflection.ReverseGenerating.ListApi.Core.Tests.csproj

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ SPDX-License-Identifier: MIT
55
<Project Sdk="Microsoft.NET.Sdk">
66
<PropertyGroup>
77
<TargetFrameworks Condition=" '$(EnableTargetFrameworkDotNet80)' == 'true' ">net8.0;$(TargetFrameworks)</TargetFrameworks>
8-
<TargetFrameworks Condition=" '$(EnableTargetFrameworkDotNet60)' == 'true' ">net6.0;$(TargetFrameworks)</TargetFrameworks>
98
<TargetFrameworks Condition=" '$(EnableTargetFrameworkNetFx)' == 'true' ">$(TargetFrameworks)</TargetFrameworks>
109
<RootNamespace>Smdn.Reflection.ReverseGenerating.ListApi.Core</RootNamespace>
1110
<NoWarn>CS2002;$(NoWarn)</NoWarn>
@@ -38,16 +37,12 @@ SPDX-License-Identifier: MIT
3837
<MSBuild Projects="@(TestProjects)" Targets="Build" Properties="Configuration=Release;TargetFramework=netstandard2.1">
3938
<Output TaskParameter="TargetOutputs" ItemName="TestAssembliesNetStandard21" />
4039
</MSBuild>
41-
<MSBuild Projects="@(TestProjects)" Targets="Build" Properties="Configuration=Release;TargetFramework=net6.0">
42-
<Output TaskParameter="TargetOutputs" ItemName="TestAssembliesNet60" />
43-
</MSBuild>
4440
<MSBuild Projects="@(TestProjects)" Targets="Build" Properties="Configuration=Release;TargetFramework=net8.0" Condition="$(TargetFrameworks.Contains('net8.0'))">
4541
<Output TaskParameter="TargetOutputs" ItemName="TestAssembliesNet80" />
4642
</MSBuild>
4743

4844
<ItemGroup>
4945
<TestAssemblies Include="@(TestAssembliesNetStandard21)" />
50-
<TestAssemblies Include="@(TestAssembliesNet60)" />
5146
<TestAssemblies Include="@(TestAssembliesNet80)" />
5247
</ItemGroup>
5348

tests/Smdn.Reflection.ReverseGenerating.ListApi.Core/Smdn.Reflection.ReverseGenerating.ListApi/ApiListWriter.cs

Lines changed: 3 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ private static System.Collections.IEnumerable YieldTestCases_WriteHeader_WriteRe
547547
string[] ExpectedReferencedAssemblies
548548
)> YieldTestCases()
549549
{
550-
#if NETCOREAPP3_1_OR_GREATER || NET6_0_OR_GREATER
550+
#if NETCOREAPP3_1_OR_GREATER || NET8_0_OR_GREATER
551551
yield return (
552552
"Lib",
553553
"netstandard2.1",
@@ -556,15 +556,6 @@ string[] ExpectedReferencedAssemblies
556556
}
557557
);
558558
#endif
559-
#if NET6_0_OR_GREATER
560-
yield return (
561-
"Lib",
562-
"net6.0",
563-
new[] {
564-
"System.Runtime, Version=6.0.",
565-
}
566-
);
567-
#endif
568559
#if NET8_0_OR_GREATER
569560
yield return (
570561
"Lib",
@@ -574,7 +565,7 @@ string[] ExpectedReferencedAssemblies
574565
}
575566
);
576567
#endif
577-
#if NETCOREAPP3_1_OR_GREATER || NET6_0_OR_GREATER
568+
#if NETCOREAPP3_1_OR_GREATER || NET8_0_OR_GREATER
578569
yield return (
579570
"LibB",
580571
"netstandard2.1",
@@ -584,17 +575,7 @@ string[] ExpectedReferencedAssemblies
584575
}
585576
);
586577
#endif
587-
#if NET6_0_OR_GREATER
588-
yield return (
589-
"LibB",
590-
"net6.0",
591-
new[] {
592-
"System.Runtime, Version=6.0.",
593-
"LibA, Version=",
594-
}
595-
);
596-
#endif
597-
#if NETCOREAPP3_1_OR_GREATER || NET6_0_OR_GREATER
578+
#if NETCOREAPP3_1_OR_GREATER || NET8_0_OR_GREATER
598579
yield return (
599580
"LibReferencedAssemblies1",
600581
"netstandard2.1",
@@ -603,17 +584,6 @@ string[] ExpectedReferencedAssemblies
603584
}
604585
);
605586
#endif
606-
#if NET6_0_OR_GREATER
607-
yield return (
608-
"LibReferencedAssemblies1",
609-
"net6.0",
610-
new[] {
611-
"System.Runtime, Version=6.0.",
612-
"System.Threading, Version=6.0.",
613-
"System.Xml.ReaderWriter, Version=6.0.",
614-
}
615-
);
616-
#endif
617587
#if NET8_0_OR_GREATER
618588
yield return (
619589
"LibReferencedAssemblies1",

tests/Smdn.Reflection.ReverseGenerating.ListApi.Core/Smdn.Reflection.ReverseGenerating.ListApi/AssemblyLoader.cs

Lines changed: 6 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -93,14 +93,10 @@ [Values] bool loadIntoReflectionOnlyContext
9393
});
9494
}
9595

96-
#if NETCOREAPP3_1_OR_GREATER || NET6_0_OR_GREATER
96+
#if NETCOREAPP3_1_OR_GREATER || NET8_0_OR_GREATER
9797
[TestCase(true, "netstandard2.1")]
9898
[TestCase(false, "netstandard2.1")]
9999
#endif
100-
#if NET6_0_OR_GREATER
101-
[TestCase(true, "net6.0")]
102-
[TestCase(false, "net6.0")]
103-
#endif
104100
#if NET8_0_OR_GREATER
105101
[TestCase(true, "net8.0")]
106102
[TestCase(false, "net8.0")]
@@ -154,7 +150,7 @@ public void UsingAssembly(bool loadIntoReflectionOnlyContext, string targetFrame
154150
Assert.That(unloaded, Is.True, nameof(unloaded));
155151
}
156152

157-
#if NETCOREAPP3_1_OR_GREATER || NET6_0_OR_GREATER
153+
#if NETCOREAPP3_1_OR_GREATER || NET8_0_OR_GREATER
158154
[TestCase(true, "netstandard2.1")]
159155
[TestCase(false, "netstandard2.1")]
160156
#endif
@@ -202,14 +198,10 @@ public void UsingAssembly_ArgumentNull_ActionWithLoadedAssembly(bool loadIntoRef
202198
Assert.That(unloaded, Is.True, nameof(unloaded));
203199
}
204200

205-
#if NETCOREAPP3_1_OR_GREATER || NET6_0_OR_GREATER
201+
#if NETCOREAPP3_1_OR_GREATER || NET8_0_OR_GREATER
206202
[TestCase(true, "netstandard2.1")]
207203
[TestCase(false, "netstandard2.1")]
208204
#endif
209-
#if NET6_0_OR_GREATER
210-
[TestCase(true, "net6.0")]
211-
[TestCase(false, "net6.0")]
212-
#endif
213205
#if NET8_0_OR_GREATER
214206
[TestCase(true, "net8.0")]
215207
[TestCase(false, "net8.0")]
@@ -267,14 +259,10 @@ public void UsingAssembly_FromStream(bool loadIntoReflectionOnlyContext, string
267259
Assert.That(unloaded, Is.True, nameof(unloaded));
268260
}
269261

270-
#if NETCOREAPP3_1_OR_GREATER || NET6_0_OR_GREATER
262+
#if NETCOREAPP3_1_OR_GREATER || NET8_0_OR_GREATER
271263
[TestCase(true, "netstandard2.1")]
272264
[TestCase(false, "netstandard2.1")]
273265
#endif
274-
#if NET6_0_OR_GREATER
275-
[TestCase(true, "net6.0")]
276-
[TestCase(false, "net6.0")]
277-
#endif
278266
#if NET8_0_OR_GREATER
279267
[TestCase(true, "net8.0")]
280268
[TestCase(false, "net8.0")]
@@ -328,14 +316,10 @@ public void UsingAssembly_ResolveDependency_ProjectReference(bool loadIntoReflec
328316
Assert.That(unloaded, Is.True, nameof(unloaded));
329317
}
330318

331-
#if NETCOREAPP3_1_OR_GREATER || NET6_0_OR_GREATER
319+
#if NETCOREAPP3_1_OR_GREATER || NET8_0_OR_GREATER
332320
[TestCase(true, "netstandard2.1")]
333321
[TestCase(false, "netstandard2.1")]
334322
#endif
335-
#if NET6_0_OR_GREATER
336-
[TestCase(true, "net6.0")]
337-
[TestCase(false, "net6.0")]
338-
#endif
339323
#if NET8_0_OR_GREATER
340324
[TestCase(true, "net8.0")]
341325
[TestCase(false, "net8.0")]
@@ -393,14 +377,10 @@ public void UsingAssembly_FromStream_ResolveDependency_ProjectReference(bool loa
393377
Assert.That(unloaded, Is.True, nameof(unloaded));
394378
}
395379

396-
#if NETCOREAPP3_1_OR_GREATER || NET6_0_OR_GREATER
380+
#if NETCOREAPP3_1_OR_GREATER || NET8_0_OR_GREATER
397381
[TestCase(true, "netstandard2.1")]
398382
[TestCase(false, "netstandard2.1")]
399383
#endif
400-
#if NET6_0_OR_GREATER
401-
[TestCase(true, "net6.0")]
402-
[TestCase(false, "net6.0")]
403-
#endif
404384
#if NET8_0_OR_GREATER
405385
[TestCase(true, "net8.0")]
406386
[TestCase(false, "net8.0")]

tests/Smdn.Reflection.ReverseGenerating.ListApi/Smdn.Reflection.ReverseGenerating.ListApi.Build/ProjectBuilder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public void Build_HasProjectReference()
108108
Assert.That(assemblyFiles[1].FullName, Does.EndWith("LibB.dll"));
109109
}
110110

111-
[TestCase("net6.0")]
111+
[TestCase("net8.0")]
112112
[TestCase("netstandard2.1")]
113113
public void Build_WithTargetFramework(string targetFramework)
114114
{

tests/Smdn.Reflection.ReverseGenerating.ListApi/Smdn.Reflection.ReverseGenerating.ListApi.Tests.csproj

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ SPDX-License-Identifier: MIT
55
<Project Sdk="Microsoft.NET.Sdk">
66
<PropertyGroup>
77
<TargetFrameworks Condition=" '$(EnableTargetFrameworkDotNet80)' == 'true' ">net8.0;$(TargetFrameworks)</TargetFrameworks>
8-
<TargetFrameworks Condition=" '$(EnableTargetFrameworkDotNet60)' == 'true' ">net6.0;$(TargetFrameworks)</TargetFrameworks>
98
<TargetFrameworks Condition=" '$(EnableTargetFrameworkNetFx)' == 'true' ">$(TargetFrameworks)<!-- ;net472 --></TargetFrameworks>
109
<RootNamespace>Smdn.Reflection.ReverseGenerating.ListApi</RootNamespace>
1110
<NoWarn>CS2002;$(NoWarn)</NoWarn>
@@ -30,11 +29,11 @@ SPDX-License-Identifier: MIT
3029
<Exec Command="dotnet restore $(TestAssemblyExeProjectPath)" />
3130
<Exec Command="dotnet restore $(TestAssemblyLibProjectPath)" />
3231

33-
<MSBuild Projects="$(TestAssemblyExeProjectPath)" Targets="Build" Properties="Configuration=Release;TargetFramework=net6.0">
34-
<Output TaskParameter="TargetOutputs" ItemName="TestAssembliesExeNet60" />
32+
<MSBuild Projects="$(TestAssemblyExeProjectPath)" Targets="Build" Properties="Configuration=Release;TargetFramework=net8.0">
33+
<Output TaskParameter="TargetOutputs" ItemName="TestAssembliesExeNet80" />
3534
</MSBuild>
36-
<MSBuild Projects="$(TestAssemblyLibProjectPath)" Targets="Build" Properties="Configuration=Release;TargetFramework=net6.0">
37-
<Output TaskParameter="TargetOutputs" ItemName="TestAssembliesLibNet60" />
35+
<MSBuild Projects="$(TestAssemblyLibProjectPath)" Targets="Build" Properties="Configuration=Release;TargetFramework=net8.0">
36+
<Output TaskParameter="TargetOutputs" ItemName="TestAssembliesLibNet80" />
3837
</MSBuild>
3938

4039
<ItemGroup>
@@ -46,15 +45,15 @@ SPDX-License-Identifier: MIT
4645
<MSBuild Projects="@(TestProjects)" Targets="Build" Properties="Configuration=Release;TargetFramework=netstandard2.1">
4746
<Output TaskParameter="TargetOutputs" ItemName="TestAssembliesNetStandard21" />
4847
</MSBuild>
49-
<MSBuild Projects="@(TestProjects)" Targets="Build" Properties="Configuration=Release;TargetFramework=net6.0">
50-
<Output TaskParameter="TargetOutputs" ItemName="TestAssembliesNet60" />
48+
<MSBuild Projects="@(TestProjects)" Targets="Build" Properties="Configuration=Release;TargetFramework=net8.0">
49+
<Output TaskParameter="TargetOutputs" ItemName="TestAssembliesNet80" />
5150
</MSBuild>
5251

5352
<ItemGroup>
54-
<TestAssemblies Include="@(TestAssembliesExeNet60)" />
55-
<TestAssemblies Include="@(TestAssembliesLibNet60)" />
53+
<TestAssemblies Include="@(TestAssembliesExeNet80)" />
54+
<TestAssemblies Include="@(TestAssembliesLibNet80)" />
5655
<TestAssemblies Include="@(TestAssembliesNetStandard21)" />
57-
<TestAssemblies Include="@(TestAssembliesNet60)" />
56+
<TestAssemblies Include="@(TestAssembliesNet80)" />
5857
</ItemGroup>
5958

6059
<PropertyGroup>

tests/Smdn.Reflection.ReverseGenerating.ListApi/Smdn.Reflection.ReverseGenerating.ListApi/RootCommandImplementation.GetInputAssemblyFiles.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ public void OneTimeTearDown()
4242
serviceProvider.Dispose();
4343
}
4444

45-
[TestCase("Lib.dll", "net6.0")]
46-
[TestCase("Exe.dll", "net6.0")]
45+
[TestCase("Lib.dll", "net8.0")]
46+
[TestCase("Exe.dll", "net8.0")]
4747
[TestCase("LibA.dll", "netstandard2.1")]
48-
[TestCase("LibA.dll", "net6.0")]
48+
[TestCase("LibA.dll", "net8.0")]
4949
public void GetInputAssemblyFiles_File_Assembly(string filename, string targetFrameworkMoniker)
5050
{
5151
var assemblyFile = new FileInfo(
@@ -135,7 +135,7 @@ public void GetInputAssemblyFiles_File_Proj_WithConfigurationOption(string optio
135135

136136
CollectionAssert.AreEquivalent(
137137
new[] {
138-
PathJoiner.Join(TestAssemblyInfo.RootDirectory.FullName, "LibA", "bin", configuration, "net6.0", "LibA.dll"),
138+
PathJoiner.Join(TestAssemblyInfo.RootDirectory.FullName, "LibA", "bin", configuration, "net8.0", "LibA.dll"),
139139
PathJoiner.Join(TestAssemblyInfo.RootDirectory.FullName, "LibA", "bin", configuration, "netstandard2.1", "LibA.dll"),
140140
},
141141
impl.GetInputAssemblyFiles(new[] { optionName, configuration, proj }).Select(f => f.FullName)
@@ -179,7 +179,7 @@ public void GetInputAssemblyFiles_File_Proj_WithRuntimeOption(string optionName,
179179

180180
CollectionAssert.AreEquivalent(
181181
new[] {
182-
PathJoiner.Join(TestAssemblyInfo.RootDirectory.FullName, "Exe", "bin", RootCommandImplementation.DefaultBuildConfiguration, "net6.0", runtime, expectedBuildOutputFileName),
182+
PathJoiner.Join(TestAssemblyInfo.RootDirectory.FullName, "Exe", "bin", RootCommandImplementation.DefaultBuildConfiguration, "net8.0", runtime, expectedBuildOutputFileName),
183183
},
184184
impl.GetInputAssemblyFiles(new[] { optionName, runtime, proj }).Select(f => f.FullName)
185185
);
@@ -198,7 +198,7 @@ public void GetInputAssemblyFiles_Directory_ProjLib()
198198

199199
CollectionAssert.AreEquivalent(
200200
new[] {
201-
PathJoiner.Join(TestAssemblyInfo.RootDirectory.FullName, "Lib", "bin", RootCommandImplementation.DefaultBuildConfiguration, "net6.0", "Lib.dll"),
201+
PathJoiner.Join(TestAssemblyInfo.RootDirectory.FullName, "Lib", "bin", RootCommandImplementation.DefaultBuildConfiguration, "net8.0", "Lib.dll"),
202202
},
203203
impl.GetInputAssemblyFiles(new[] { dirProj }).Select(f => f.FullName)
204204
);
@@ -218,7 +218,7 @@ public void GetInputAssemblyFiles_Directory_ProjExe()
218218

219219
CollectionAssert.AreEquivalent(
220220
new[] {
221-
PathJoiner.Join(TestAssemblyInfo.RootDirectory.FullName, "Exe", "bin", RootCommandImplementation.DefaultBuildConfiguration, "net6.0", expectedBuildOutputFileName),
221+
PathJoiner.Join(TestAssemblyInfo.RootDirectory.FullName, "Exe", "bin", RootCommandImplementation.DefaultBuildConfiguration, "net8.0", expectedBuildOutputFileName),
222222
},
223223
impl.GetInputAssemblyFiles(new[] { dirProj }).Select(f => f.FullName)
224224
);

tests/Smdn.Reflection.ReverseGenerating.ListApi/Smdn.Reflection.ReverseGenerating.ListApi/RootCommandImplementation.GetOutputFilePaths.cs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ public void OneTimeTearDown()
4141

4242
static string GetCurrentDirectory() => TestContext.CurrentContext.WorkDirectory;
4343

44-
[TestCase("Lib.dll", "net6.0", "Lib-net6.0.apilist.cs")]
45-
[TestCase("Exe.dll", "net6.0", "Exe-net6.0.apilist.cs")]
44+
[TestCase("Lib.dll", "net8.0", "Lib-net8.0.apilist.cs")]
45+
[TestCase("Exe.dll", "net8.0", "Exe-net8.0.apilist.cs")]
4646
[TestCase("LibA.dll", "netstandard2.1", "LibA-netstandard2.1.apilist.cs")]
47-
[TestCase("LibA.dll", "net6.0", "LibA-net6.0.apilist.cs")]
47+
[TestCase("LibA.dll", "net8.0", "LibA-net8.0.apilist.cs")]
4848
public void GetOutputFilePaths(string filename, string targetFrameworkMoniker, string expectedOutputFileName)
4949
{
5050
var assemblyFile = new FileInfo(
@@ -65,7 +65,7 @@ public void GetOutputFilePaths(string filename, string targetFrameworkMoniker, s
6565
public void GetOutputFilePaths_WithOutputDirectoryOption(string optionName, string outputDirectory)
6666
{
6767
var assemblyFile = new FileInfo(
68-
TestAssemblyInfo.TestAssemblyPaths.First(f => f.Contains("net6.0") && f.Contains("Lib.dll"))
68+
TestAssemblyInfo.TestAssemblyPaths.First(f => f.Contains("net8.0") && f.Contains("Lib.dll"))
6969
);
7070

7171
var impl = new RootCommandImplementation(serviceProvider);
@@ -74,7 +74,7 @@ public void GetOutputFilePaths_WithOutputDirectoryOption(string optionName, stri
7474
assemblyFile.FullName
7575
}).First();
7676

77-
Assert.That(Path.GetFileName(outputFilePath), Is.EqualTo("Lib-net6.0.apilist.cs"));
77+
Assert.That(Path.GetFileName(outputFilePath), Is.EqualTo("Lib-net8.0.apilist.cs"));
7878
Assert.That(Path.GetDirectoryName(outputFilePath), Is.EqualTo(Path.GetFullPath(outputDirectory)));
7979
}
8080

@@ -88,7 +88,7 @@ public void GetOutputFilePaths_FromProjFile()
8888
}).First();
8989

9090
Assert.AreEqual(
91-
"Exe-net6.0.apilist.cs",
91+
"Exe-net8.0.apilist.cs",
9292
Path.GetFileName(outputFilePath)
9393
);
9494
Assert.AreEqual(
@@ -112,7 +112,7 @@ public void GetOutputFilePaths_FromProjFile_WithOutputDirectoryOption(string opt
112112
}).First();
113113

114114
Assert.AreEqual(
115-
"Exe-net6.0.apilist.cs",
115+
"Exe-net8.0.apilist.cs",
116116
Path.GetFileName(outputFilePath)
117117
);
118118
Assert.AreEqual(
@@ -140,7 +140,7 @@ public void GetOutputFilePaths_FromProjFile_WithConfigurationOption(string optio
140140
CollectionAssert.AreEquivalent(
141141
new[] {
142142
"LibA-netstandard2.1.apilist.cs",
143-
"LibA-net6.0.apilist.cs",
143+
"LibA-net8.0.apilist.cs",
144144
},
145145
outputFilePaths.Select(f => Path.GetFileName(f))
146146
);
@@ -149,9 +149,9 @@ public void GetOutputFilePaths_FromProjFile_WithConfigurationOption(string optio
149149
#endif
150150
}
151151

152-
[TestCase("-f", "net6.0")]
152+
[TestCase("-f", "net8.0")]
153153
[TestCase("-f", "netstandard2.1")]
154-
[TestCase("--framework", "net6.0")]
154+
[TestCase("--framework", "net8.0")]
155155
[TestCase("--framework", "netstandard2.1")]
156156
public void GetOutputFilePaths_FromProjFile_WithTargetFrameworkOption(string optionName, string targetFramework)
157157
{
@@ -189,7 +189,7 @@ public void GetOutputFilePaths_FromProjFile_WithRuntimeOption(string optionName,
189189
CollectionAssert.AreEquivalent(
190190
new[] {
191191
"LibA-netstandard2.1.apilist.cs",
192-
"LibA-net6.0.apilist.cs",
192+
"LibA-net8.0.apilist.cs",
193193
},
194194
outputFilePaths.Select(f => Path.GetFileName(f))
195195
);

tests/Smdn.Reflection.ReverseGenerating/Smdn.Reflection.ReverseGenerating.Tests.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ SPDX-License-Identifier: MIT
55
<Project Sdk="Microsoft.NET.Sdk">
66
<PropertyGroup>
77
<TargetFrameworks Condition=" '$(EnableTargetFrameworkDotNet80)' == 'true' ">net8.0;$(TargetFrameworks)</TargetFrameworks>
8-
<TargetFrameworks Condition=" '$(EnableTargetFrameworkDotNet60)' == 'true' ">net6.0;$(TargetFrameworks)</TargetFrameworks>
98
<TargetFrameworks Condition=" '$(EnableTargetFrameworkNetFx)' == 'true' ">$(TargetFrameworks);net47</TargetFrameworks>
109
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
1110
<!-- do not use 'enable' or 'annotations': affects the behavior of the test cases -->

0 commit comments

Comments
 (0)