Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Clean-up the stack trace further - #3256

#3256
Open
jnyrup wants to merge 2 commits into
fluentassertions:mainfluentassertions/fluentassertions:mainfrom
jnyrup:StackTraceHiddenjnyrup/fluentassertions:StackTraceHiddenCopy head branch name to clipboard
Open

Clean-up the stack trace further#3256
jnyrup wants to merge 2 commits into
fluentassertions:mainfluentassertions/fluentassertions:mainfrom
jnyrup:StackTraceHiddenjnyrup/fluentassertions:StackTraceHiddenCopy head branch name to clipboard

Conversation

@jnyrup

@jnyrup jnyrup commented Jul 11, 2026

Copy link
Copy Markdown
Member

Hide methods that are not { public, protected, protected internal }.

Follow-up to #3152

As an example, here are the before and after stack traces of When_an_ulong_value_is_not_close_to_expected_value_it_should_fail if we let it fail.

before:

NumericAssertionsExtensions.FailIfValueOutsideBounds[TValue,TDelta](AssertionChain assertionChain, Boolean valueWithinBounds, TValue nearbyValue, TDelta delta, TValue actualValue, String because, Object[] becauseArgs) line 363
NumericAssertionsExtensions.BeCloseTo(NumericAssertions`1 parent, UInt64 nearbyValue, UInt64 delta, String because, Object[] becauseArgs) line 350
BeCloseTo.When_an_ulong_value_is_not_close_to_expected_value_it_should_fail(UInt64 actual, UInt64 nearbyValue, UInt64 delta) line 707
RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span`1 copyOfArgs, BindingFlags invokeAttr)

after:

NumericAssertionsExtensions.BeCloseTo(NumericAssertions`1 parent, UInt64 nearbyValue, UInt64 delta, String because, Object[] becauseArgs) line 350
BeCloseTo.When_an_ulong_value_is_not_close_to_expected_value_it_should_fail(UInt64 actual, UInt64 nearbyValue, UInt64 delta) line 707
InvokeStub_BeCloseTo.When_an_ulong_value_is_not_close_to_expected_value_it_should_fail(Object, Span`1)
MethodBaseInvoker.InvokeWithFewArgs(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

Ignore the first commit, that's #3257

IMPORTANT

  • If the PR touches the public API, the changes have been approved in a separate issue with the "api-approved" label.
  • The code complies with the Coding Guidelines for C#.
  • The changes are covered by unit tests which follow the Arrange-Act-Assert syntax and the naming conventions such as is used in these tests.
  • If the PR adds a feature or fixes a bug, please update the release notes with a functional description that explains what the change means to consumers of this library, which are published on the website.
  • If the PR changes the public API the changes needs to be included by running AcceptApiChanges.ps1 or AcceptApiChanges.sh.
  • If the PR affects the documentation, please include your changes in this pull request so the documentation will appear on the website.
    • Please also run ./build.sh --target spellcheck or .\build.ps1 --target spellcheck before pushing and check the good outcome

CONTRIBUTOR LICENSE GRANT

By submitting this contribution, the contributor hereby irrevocably grants to the project owners and maintainers a perpetual, worldwide, royalty-free, irrevocable license to use, reproduce, modify, distribute, sublicense, and create derivative works of the contribution for any purpose and under any terms, including proprietary licensing.

The contributor waives any moral rights in the contribution to the extent permitted by law and agrees not to assert any claim of authorship or control over the contribution. The contributor represents that they are the sole author of the contribution and that it is provided free of any third-party claims.

The contributor understands and agrees that the maintainers may, at their sole discretion, use, license, or redistribute the contribution as part of any work and under any terms they choose, without further permission or attribution.

  • I have read the Contributor License Grant and accept the conditions
  • I'm interested in a free license for Fluent Assertions and will share my email address through sales@xceed.com

@dennisdoomen

Copy link
Copy Markdown
Member

I guess this one should been a draft PR? Or did you accidentally continue on a previous feature branch?

@jnyrup

jnyrup commented Jul 12, 2026

Copy link
Copy Markdown
Member Author

I based this branch on #3257 since that adds the ThatSatisfy used in the two tests.
I thought I could then set that as the base branch for this PR on GitHub, but apparently I cannot.

return OrderStrictness.Irrelevant;
}

[StackTraceHidden]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔Why don't we assign the attribute to the class?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.