From 834417a7dbec1dbb22a99cbb5f45c9cd474e483e Mon Sep 17 00:00:00 2001 From: Andrey Akinshin Date: Sat, 20 Jul 2024 10:03:05 +0200 Subject: [PATCH] Improve logging in ScottPlotExporterTests --- .../ScottPlotExporterTests.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/BenchmarkDotNet.Exporters.Plotting.Tests/ScottPlotExporterTests.cs b/tests/BenchmarkDotNet.Exporters.Plotting.Tests/ScottPlotExporterTests.cs index a585b9df86..32f69061f6 100644 --- a/tests/BenchmarkDotNet.Exporters.Plotting.Tests/ScottPlotExporterTests.cs +++ b/tests/BenchmarkDotNet.Exporters.Plotting.Tests/ScottPlotExporterTests.cs @@ -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 GetGroupBenchmarkTypes() { @@ -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")] @@ -233,6 +238,7 @@ public class Escape_ParamsAndArguments [Arguments('\t')] [Arguments('\n')] [Benchmark] public void Foo(char charArg) { } + [Benchmark] public void Bar() { } } }