diff --git a/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TerminalTestReporter.cs b/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TerminalTestReporter.cs index afcc850879..f9163957a7 100644 --- a/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TerminalTestReporter.cs +++ b/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TerminalTestReporter.cs @@ -50,14 +50,23 @@ internal sealed partial class TerminalTestReporter : IDisposable private bool? _shouldShowPassedTests; -#if NET7_0_OR_GREATER - [GeneratedRegex(@$"^ at ((?.+) in (?.+):line (?\d+)|(?.+))$", RegexOptions.ExplicitCapture, 1000)] - private static partial Regex GetFrameRegex(); -#else private static Regex? s_regex; +#if NET7_0_OR_GREATER + + [GeneratedRegex(@"^ at (?.+\))( in (?.+):line (?\d+))?$", RegexOptions.ExplicitCapture, 1000)] + internal static partial Regex GetStandardFrameRegex(); + + [GeneratedRegex(@"^ at (?.+\))", RegexOptions.ExplicitCapture, 1000)] + internal static partial Regex GetAOTFrameRegex(); + + internal static Regex GetFrameRegex() => s_regex ??= + System.Runtime.CompilerServices.RuntimeFeature.IsDynamicCodeSupported + ? GetStandardFrameRegex() + : GetAOTFrameRegex(); +#else [MemberNotNull(nameof(s_regex))] - private static Regex GetFrameRegex() + internal static Regex GetFrameRegex() { if (s_regex != null) { @@ -75,7 +84,9 @@ private static Regex GetFrameRegex() { // Get these resources: https://github.com/dotnet/runtime/blob/main/src/libraries/System.Private.CoreLib/src/Resources/Strings.resx #pragma warning disable RS0030 // Do not use banned APIs - MethodInfo? getResourceStringMethod = typeof(Environment).GetMethod("GetResourceString", BindingFlags.Static | BindingFlags.NonPublic, null, [typeof(string)], null); + MethodInfo? getResourceStringMethod = typeof(Environment).GetMethod( + "GetResourceString", + BindingFlags.Static | BindingFlags.NonPublic, null, [typeof(string)], null); #pragma warning restore RS0030 // Do not use banned APIs if (getResourceStringMethod is not null) { @@ -96,7 +107,7 @@ private static Regex GetFrameRegex() string inPattern = string.Format(CultureInfo.InvariantCulture, inString, "(?.+)", @"(?\d+)"); - s_regex = new Regex(@$"^ {atString} ((?.+) {inPattern}|(?.+))$", RegexOptions.Compiled | RegexOptions.ExplicitCapture, matchTimeout: TimeSpan.FromSeconds(1)); + s_regex = new Regex($@"^ {atString} (?.+\))( {inPattern})?$", RegexOptions.Compiled | RegexOptions.ExplicitCapture, matchTimeout: TimeSpan.FromSeconds(1)); return s_regex; } #endif @@ -653,13 +664,14 @@ private static void AppendAssemblyLinkTargetFrameworkAndArchitecture(ITerminal t bool weHaveFilePathAndCodeLine = !RoslynString.IsNullOrWhiteSpace(match.Groups["code"].Value); terminal.Append(PlatformResources.StackFrameAt); terminal.Append(' '); + if (weHaveFilePathAndCodeLine) { terminal.Append(match.Groups["code"].Value); } else { - terminal.Append(match.Groups["code1"].Value); + terminal.Append(match.Groups["line"].Value); } if (weHaveFilePathAndCodeLine) diff --git a/test/UnitTests/Microsoft.Testing.Platform.UnitTests/OutputDevice/Terminal/TerminalTestReporterTests.cs b/test/UnitTests/Microsoft.Testing.Platform.UnitTests/OutputDevice/Terminal/TerminalTestReporterTests.cs index 58ad5b0aad..7d64c39c06 100644 --- a/test/UnitTests/Microsoft.Testing.Platform.UnitTests/OutputDevice/Terminal/TerminalTestReporterTests.cs +++ b/test/UnitTests/Microsoft.Testing.Platform.UnitTests/OutputDevice/Terminal/TerminalTestReporterTests.cs @@ -3,6 +3,7 @@ using System.Runtime.InteropServices; using System.Text; +using System.Text.RegularExpressions; using Microsoft.Testing.Platform.Helpers; using Microsoft.Testing.Platform.OutputDevice.Terminal; @@ -42,6 +43,474 @@ public void AppendStackFrameFormatsStackTraceLineCorrectly() Assert.That(!terminal.Output.ToString().Contains(" :0")); } + public void StackTraceRegexCapturesLines() + { + string[] stackTraceLines = """ + at System.Text.RegularExpressions.RegexRunner.g__ThrowRegexTimeout|25_0() + at System.Text.RegularExpressions.Generated.F06D33C3F8C8C3FD257C1A1967E3A3BAC4BE9C8EC41CC9366C764C2205C68F0CE__GetFrameRegex_1.RunnerFactory.Runner.TryMatchAtCurrentPosition(ReadOnlySpan`1) in /_/artifacts/obj/Microsoft.Testing.Platform/Release/net8.0/System.Text.RegularExpressions.Generator/System.Text.RegularExpressions.Generator.RegexGenerator/RegexGenerator.g.cs:line 639 + at System.Text.RegularExpressions.Generated.F06D33C3F8C8C3FD257C1A1967E3A3BAC4BE9C8EC41CC9366C764C2205C68F0CE__GetFrameRegex_1.RunnerFactory.Runner.Scan(ReadOnlySpan`1) in /_/artifacts/obj/Microsoft.Testing.Platform/Release/net8.0/System.Text.RegularExpressions.Generator/System.Text.RegularExpressions.Generator.RegexGenerator/RegexGenerator.g.cs:line 537 + at System.Text.RegularExpressions.Regex.ScanInternal(RegexRunnerMode, Boolean, String, Int32, RegexRunner, ReadOnlySpan`1, Boolean) + at System.Text.RegularExpressions.Regex.RunSingleMatch(RegexRunnerMode, Int32, String, Int32, Int32, Int32) + at System.Text.RegularExpressions.Regex.Match(String) + at Microsoft.Testing.Platform.OutputDevice.Terminal.TerminalTestReporter.AppendStackFrame(ITerminal, String) in /_/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TerminalTestReporter.cs:line 650 + at Microsoft.Testing.Platform.OutputDevice.Terminal.TerminalTestReporter.FormatStackTrace(ITerminal, FlatException[], Int32) in /_/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TerminalTestReporter.cs:line 601 + at Microsoft.Testing.Platform.OutputDevice.Terminal.TerminalTestReporter.RenderTestCompleted(ITerminal , String , String, String, String , TestOutcome, TimeSpan, FlatException[] , String, String, String, String) in /_/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TerminalTestReporter.cs:line 517 + at Microsoft.Testing.Platform.OutputDevice.Terminal.TerminalTestReporter.<>c__DisplayClass27_0.b__0(ITerminal terminal) in /_/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TerminalTestReporter.cs:line 439 + at Microsoft.Testing.Platform.OutputDevice.Terminal.TestProgressStateAwareTerminal.WriteToTerminal(Action`1) in /_/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestProgressStateAwareTerminal.cs:line 129 + at Microsoft.Testing.Platform.OutputDevice.Terminal.TerminalTestReporter.TestCompleted(String , String, String, String, String , TestOutcome, TimeSpan, FlatException[] , String, String, String, String) in /_/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TerminalTestReporter.cs:line 439 + at Microsoft.Testing.Platform.OutputDevice.Terminal.TerminalTestReporter.TestCompleted(String , String, String, String, String , TestOutcome, TimeSpan, String, Exception, String, String, String, String) in /_/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TerminalTestReporter.cs:line 386 + at Microsoft.Testing.Platform.OutputDevice.TerminalOutputDevice.ConsumeAsync(IDataProducer, IData, CancellationToken) in /_/src/Platform/Microsoft.Testing.Platform/OutputDevice/TerminalOutputDevice.cs:line 458 + at Microsoft.Testing.Platform.Messages.AsyncConsumerDataProcessor.ConsumeAsync() in /_/src/Platform/Microsoft.Testing.Platform/Messages/ChannelConsumerDataProcessor.cs:line 74 + at Microsoft.Testing.Platform.Messages.AsyncConsumerDataProcessor.DrainDataAsync() in /_/src/Platform/Microsoft.Testing.Platform/Messages/ChannelConsumerDataProcessor.cs:line 146 + at Microsoft.Testing.Platform.Messages.AsynchronousMessageBus.DrainDataAsync() in /_/src/Platform/Microsoft.Testing.Platform/Messages/AsynchronousMessageBus.cs:line 177 + at Microsoft.Testing.Platform.Messages.MessageBusProxy.DrainDataAsync() in /_/src/Platform/Microsoft.Testing.Platform/Messages/MessageBusProxy.cs:line 39 + at Microsoft.Testing.Platform.Hosts.CommonTestHost.NotifyTestSessionEndAsync(SessionUid, BaseMessageBus, ServiceProvider, CancellationToken) in /_/src/Platform/Microsoft.Testing.Platform/Hosts/CommonTestHost.cs:line 192 + at Microsoft.Testing.Platform.Hosts.CommonTestHost.ExecuteRequestAsync(IPlatformOutputDevice, ITestSessionContext, ServiceProvider, BaseMessageBus, ITestFramework, ClientInfo) in /_/src/Platform/Microsoft.Testing.Platform/Hosts/CommonTestHost.cs:line 133 + at Microsoft.Testing.Platform.Hosts.ConsoleTestHost.InternalRunAsync() in /_/src/Platform/Microsoft.Testing.Platform/Hosts/ConsoleTestHost.cs:line 85 + at Microsoft.Testing.Platform.Hosts.ConsoleTestHost.InternalRunAsync() in /_/src/Platform/Microsoft.Testing.Platform/Hosts/ConsoleTestHost.cs:line 117 + at Microsoft.Testing.Platform.Hosts.CommonTestHost.RunTestAppAsync(CancellationToken) in /_/src/Platform/Microsoft.Testing.Platform/Hosts/CommonTestHost.cs:line 106 + at Microsoft.Testing.Platform.Hosts.CommonTestHost.RunAsync() in /_/src/Platform/Microsoft.Testing.Platform/Hosts/CommonTestHost.cs:line 34 + at Microsoft.Testing.Platform.Hosts.CommonTestHost.RunAsync() in /_/src/Platform/Microsoft.Testing.Platform/Hosts/CommonTestHost.cs:line 72 + at Microsoft.Testing.Platform.Builder.TestApplication.RunAsync() in /_/src/Platform/Microsoft.Testing.Platform/Builder/TestApplication.cs:line 244 + at TestingPlatformEntryPoint.Main(String[]) in /_/TUnit.TestProject/obj/Release/net8.0/osx-x64/TestPlatformEntryPoint.cs:line 16 + at TestingPlatformEntryPoint.
(String[]) + """.Split([Environment.NewLine], StringSplitOptions.RemoveEmptyEntries); + + Regex regex = TerminalTestReporter.GetFrameRegex(); + foreach (string stackTraceLine in stackTraceLines) + { + Match match = regex.Match(stackTraceLine); + Assert.IsTrue(match.Success); + Assert.IsTrue(match.Groups["code"].Success); + + bool hasFileAndLine = char.IsDigit(stackTraceLine.Last()); + Assert.That(match.Groups["file"].Success == hasFileAndLine); + Assert.That(match.Groups["line"].Success == hasFileAndLine); + } + } + +#if NET7_0_OR_GREATER + public void AOTStackTraceRegexCapturesLines() + { + string[] stackTraceLines = """ + at BenchmarkTest.ExceptionThrower.d__7.MoveNext() + 0x42f + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__5.MoveNext() + 0x9d + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__7.MoveNext() + 0x341 + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__2.MoveNext() + 0x9d + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__7.MoveNext() + 0x17f + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__4.MoveNext() + 0x9d + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__7.MoveNext() + 0x2ab + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__2.MoveNext() + 0x9d + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__7.MoveNext() + 0x17f + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__5.MoveNext() + 0x9d + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__7.MoveNext() + 0x341 + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__3.MoveNext() + 0x9d + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__7.MoveNext() + 0x215 + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__4.MoveNext() + 0x9d + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__7.MoveNext() + 0x2ab + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__4.MoveNext() + 0x9d + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__7.MoveNext() + 0x2ab + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__2.MoveNext() + 0x9d + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__7.MoveNext() + 0x17f + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__3.MoveNext() + 0x9d + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__7.MoveNext() + 0x215 + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__5.MoveNext() + 0x9d + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__7.MoveNext() + 0x341 + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__5.MoveNext() + 0x9d + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__7.MoveNext() + 0x341 + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__2.MoveNext() + 0x9d + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__7.MoveNext() + 0x17f + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__2.MoveNext() + 0x9d + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__7.MoveNext() + 0x17f + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__2.MoveNext() + 0x9d + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__7.MoveNext() + 0x17f + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__3.MoveNext() + 0x9d + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__7.MoveNext() + 0x215 + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__4.MoveNext() + 0x9d + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__7.MoveNext() + 0x2ab + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__2.MoveNext() + 0x9d + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__7.MoveNext() + 0x17f + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__4.MoveNext() + 0x9d + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__7.MoveNext() + 0x2ab + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__2.MoveNext() + 0x9d + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__1.MoveNext() + 0xad + at BenchmarkTest.ExceptionThrower.d__7.MoveNext() + 0x42f + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__5.MoveNext() + 0x9d + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__7.MoveNext() + 0x341 + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__2.MoveNext() + 0x9d + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__7.MoveNext() + 0x17f + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__4.MoveNext() + 0x9d + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__7.MoveNext() + 0x2ab + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__2.MoveNext() + 0x9d + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__7.MoveNext() + 0x17f + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__5.MoveNext() + 0x9d + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__7.MoveNext() + 0x341 + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__3.MoveNext() + 0x9d + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__7.MoveNext() + 0x215 + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__4.MoveNext() + 0x9d + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__7.MoveNext() + 0x2ab + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__4.MoveNext() + 0x9d + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__7.MoveNext() + 0x2ab + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__2.MoveNext() + 0x9d + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__7.MoveNext() + 0x17f + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__3.MoveNext() + 0x9d + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__7.MoveNext() + 0x215 + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__5.MoveNext() + 0x9d + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__7.MoveNext() + 0x341 + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__5.MoveNext() + 0x9d + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__7.MoveNext() + 0x341 + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__2.MoveNext() + 0x9d + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__7.MoveNext() + 0x17f + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__2.MoveNext() + 0x9d + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__7.MoveNext() + 0x17f + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__2.MoveNext() + 0x9d + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__7.MoveNext() + 0x17f + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__3.MoveNext() + 0x9d + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__7.MoveNext() + 0x215 + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__4.MoveNext() + 0x9d + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__7.MoveNext() + 0x2ab + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__2.MoveNext() + 0x9d + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__7.MoveNext() + 0x17f + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__4.MoveNext() + 0x9d + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__7.MoveNext() + 0x2ab + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__2.MoveNext() + 0x9d + --- End of stack trace from previous location --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 + at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b + at BenchmarkTest.ExceptionThrower.d__1.MoveNext() + 0xad + """.Split([Environment.NewLine], StringSplitOptions.RemoveEmptyEntries); + + Regex regex = TerminalTestReporter.GetAOTFrameRegex(); + foreach (string stackTraceLine in stackTraceLines.Where(line => + !line.StartsWith("--- ", StringComparison.Ordinal))) + { + Match match = regex.Match(stackTraceLine); + Assert.IsTrue(match.Success); + Assert.IsTrue(match.Groups["code"].Success); + + Assert.IsFalse(match.Groups["file"].Success); + Assert.IsFalse(match.Groups["line"].Success); + } + } +#endif + public void OutputFormattingIsCorrect() { var stringBuilderConsole = new StringBuilderConsole();