Skip to content

Commit 588caa3

Browse files
committed
Fix tests
1 parent 77d9bb9 commit 588caa3

1 file changed

Lines changed: 17 additions & 3 deletions

File tree

tests/BenchmarkDotNet.Tests/ConfigParserTests.cs

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,6 @@ public void NetMonikersAreRecognizedAsNetCoreMonikers(string input, string expec
386386
[Theory]
387387
[InlineData("net481", ".NET Framework 4.8.1")]
388388
[InlineData("net7.0", ".NET 7.0")]
389-
[InlineData("nativeaot7.0", "NativeAOT 7.0")]
390389
public void NetMonikersHaveNiceNames(string input, string expected)
391390
{
392391
// CoreRuntime.
@@ -396,7 +395,22 @@ public void NetMonikersHaveNiceNames(string input, string expected)
396395
var job = config.GetJobs().Single();
397396
Assert.NotNull(job);
398397
Assert.Equal(expected, job.Environment.Runtime.Name);
399-
Assert.Equal(expected, job.Infrastructure.Toolchain.Name);
398+
Assert.Equal(expected, job.GetToolchain().Name);
399+
}
400+
401+
[Theory]
402+
[InlineData("nativeaot6.0", "NativeAOT 6.0", "ILCompiler 6.0.0-*")]
403+
[InlineData("nativeaot7.0", "NativeAOT 7.0", "Latest ILCompiler")]
404+
public void NativeAotMonikersHaveNiceNames(string input, string runtimeName, string toolchainName)
405+
{
406+
// CoreRuntime.
407+
var config = ConfigParser.Parse(new[] { "-r", input }, new OutputLogger(Output)).config;
408+
409+
Assert.Single(config.GetJobs());
410+
var job = config.GetJobs().Single();
411+
Assert.NotNull(job);
412+
Assert.Equal(runtimeName, job.Environment.Runtime.Name);
413+
Assert.Equal(toolchainName, job.GetToolchain().Name);
400414
}
401415

402416
[Theory]
@@ -425,7 +439,7 @@ public void PlatformSpecificMonikersHaveNiceNames(string input, string expected)
425439
var job = config.GetJobs().Single();
426440
Assert.NotNull(job);
427441
//todo: add postfix to runtime name instead toolchain name
428-
Assert.Equal(expected, job.Infrastructure.Toolchain.Name);
442+
Assert.Equal(expected, job.GetToolchain().Name);
429443
}
430444

431445
[Fact]

0 commit comments

Comments
 (0)