Skip to content

Commit

Permalink
Improve logging in ScottPlotExporterTests
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreyAkinshin committed Jul 20, 2024
1 parent f8082a2 commit 834417a
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@
using System.IO;
using System.Linq;
using Xunit;
using Xunit.Abstractions;

namespace BenchmarkDotNet.Exporters.Plotting.Tests
{
public class ScottPlotExporterTests
public class ScottPlotExporterTests(ITestOutputHelper output)
{
public static TheoryData<Type> GetGroupBenchmarkTypes()
{
Expand All @@ -32,6 +33,10 @@ public void BarPlots(Type benchmarkType)
var filePaths = exporter.ExportToFiles(summary, logger).ToList();
Assert.NotEmpty(filePaths);
Assert.All(filePaths, f => File.Exists(f));

foreach (string filePath in filePaths)
logger.WriteLine($"* {filePath}");
output.WriteLine(logger.GetLog());
}

[SuppressMessage("ReSharper", "InconsistentNaming")]
Expand Down Expand Up @@ -233,6 +238,7 @@ public class Escape_ParamsAndArguments
[Arguments('\t')]
[Arguments('\n')]
[Benchmark] public void Foo(char charArg) { }

[Benchmark] public void Bar() { }
}
}
Expand Down

0 comments on commit 834417a

Please sign in to comment.