Skip to content

Commit d2f6904

Browse files
timcassellAndreyAkinshin
authored andcommitted
Update tests.
1 parent f321667 commit d2f6904

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

tests/BenchmarkDotNet.Tests/BuildResultTests.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,32 +11,32 @@ public class BuildResultTests
1111
[Fact]
1212
public void NotFullyCompatibleMsBuildErrorIsTranslatedToMoreUserFriendlyVersion()
1313
{
14-
const string msbuildError = @"C:\Program Files\dotnet\sdk\3.0.100-preview9-013617\Microsoft.Common.CurrentVersion.targets(1653,5): warning NU1702: ProjectReference 'C:\Projects\BenchmarkDotNet\tests\BenchmarkDotNet.IntegrationTests.SingleRuntime.DotNetFramework\BenchmarkDotNet.IntegrationTests.SingleRuntime.DotNetFramework.csproj' was resolved using '.NETFramework,Version=v4.6.2' instead of the project target framework '.NETCoreApp,Version=v2.1'. This project may not be fully compatible with your project. [C:\Projects\BenchmarkDotNet\tests\BenchmarkDotNet.IntegrationTests\bin\Release\net462\Job-VUALUD\BenchmarkDotNet.Autogenerated.csproj]";
14+
const string msbuildError = @"C:\Program Files\dotnet\sdk\3.0.100-preview9-013617\Microsoft.Common.CurrentVersion.targets(1653,5): warning NU1702: ProjectReference 'C:\Projects\BenchmarkDotNet\tests\BenchmarkDotNet.IntegrationTests.SingleRuntime.DotNetFramework\BenchmarkDotNet.IntegrationTests.SingleRuntime.DotNetFramework.csproj' was resolved using '.NETFramework,Version=v4.6.2' instead of the project target framework '.NETCoreApp,Version=v8.0'. This project may not be fully compatible with your project. [C:\Projects\BenchmarkDotNet\tests\BenchmarkDotNet.IntegrationTests\bin\Release\net462\Job-VUALUD\BenchmarkDotNet.Autogenerated.csproj]";
1515

16-
string expected = $@"The project which defines benchmarks does not target 'netcoreapp2.1'." + Environment.NewLine +
17-
$"You need to add 'netcoreapp2.1' to <TargetFrameworks> in your project file " +
16+
string expected = $@"The project which defines benchmarks does not target 'net8.0'." + Environment.NewLine +
17+
$"You need to add 'net8.0' to <TargetFrameworks> in your project file " +
1818
@"('C:\Projects\BenchmarkDotNet\tests\BenchmarkDotNet.IntegrationTests.SingleRuntime.DotNetFramework\BenchmarkDotNet.IntegrationTests.SingleRuntime.DotNetFramework.csproj')." + Environment.NewLine +
19-
"Example: <TargetFrameworks>net462;netcoreapp2.1</TargetFrameworks>";
19+
"Example: <TargetFrameworks>net462;net8.0</TargetFrameworks>";
2020
Verify(msbuildError, true, expected);
2121
}
2222

2323
[Fact]
2424
public void NotCompatibleMsBuildErrorIsTranslatedToMoreUserFriendlyVersion()
2525
{
26-
const string msbuildError = @"error NU1201: Project BenchmarkDotNet.IntegrationTests.SingleRuntime.DotNetCore is not compatible with net462 (.NETFramework,Version=v4.6.2) / win7-x64. Project BenchmarkDotNet.IntegrationTests.SingleRuntime.DotNetCore supports: netcoreapp2.1 (.NETCoreApp,Version=v2.1)";
26+
const string msbuildError = @"error NU1201: Project BenchmarkDotNet.IntegrationTests.SingleRuntime.DotNetCore is not compatible with net462 (.NETFramework,Version=v4.6.2) / win7-x64. Project BenchmarkDotNet.IntegrationTests.SingleRuntime.DotNetCore supports: net8.0 (.NETCoreApp,Version=v8.0)";
2727

2828
string expected = $@"The project which defines benchmarks does not target 'net462'." + Environment.NewLine +
2929
$"You need to add 'net462' to <TargetFrameworks> in your project file " +
3030
@"('BenchmarkDotNet.IntegrationTests.SingleRuntime.DotNetCore')." + Environment.NewLine +
31-
"Example: <TargetFrameworks>netcoreapp2.1;net462</TargetFrameworks>";
31+
"Example: <TargetFrameworks>net8.0;net462</TargetFrameworks>";
3232

3333
Verify(msbuildError, true, expected);
3434
}
3535

3636
[Fact]
3737
public void MissingSdkIsTranslatedToMoreUserFriendlyVersion()
3838
{
39-
const string msbuildError = @"C:\Program Files\dotnet\sdk\3.0.100-preview9-013617\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.TargetFrameworkInference.targets(134,5): error NETSDK1045: The current .NET SDK does not support targeting .NET Core 5.0. Either target .NET Core 3.0 or lower, or use a version of the .NET SDK that supports .NET Core 5.0. [C:\Projects\BenchmarkDotNet\samples\BenchmarkDotNet.Samples\bin\Release\netcoreapp2.1\bad57fca-694a-41ad-b630-9e5317a782ab\BenchmarkDotNet.Autogenerated.csproj]";
39+
const string msbuildError = @"C:\Program Files\dotnet\sdk\3.0.100-preview9-013617\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.TargetFrameworkInference.targets(134,5): error NETSDK1045: The current .NET SDK does not support targeting .NET Core 5.0. Either target .NET Core 3.0 or lower, or use a version of the .NET SDK that supports .NET Core 5.0. [C:\Projects\BenchmarkDotNet\samples\BenchmarkDotNet.Samples\bin\Release\net8.0\bad57fca-694a-41ad-b630-9e5317a782ab\BenchmarkDotNet.Autogenerated.csproj]";
4040

4141
string expected = "The current .NET SDK does not support targeting .NET Core 5.0. You need to install it or pass the path to dotnet cli via the `--cli` console line argument.";
4242

0 commit comments

Comments
 (0)