Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent inlining to guarantee stack frames in test #3002

Merged
merged 3 commits into from
Nov 14, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using System.Runtime.CompilerServices;
using Xunit;

namespace Microsoft.IdentityModel.Tokens.Tests
Expand All @@ -22,11 +23,13 @@ public void ExceptionCreatedFromValidationError_ContainsTheRightStackTrace()
}
class ValidationErrorReturningClass
{
[MethodImpl(MethodImplOptions.NoInlining)]
public ValidationError firstMethod()
pmaytak marked this conversation as resolved.
Show resolved Hide resolved
{
return secondMethod().AddCurrentStackFrame();
}

[MethodImpl(MethodImplOptions.NoInlining)]
public ValidationError secondMethod()
{
return thirdMethod().AddCurrentStackFrame();
Expand Down
Loading