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

Assuming types that override Equals to have value semantics #740

Merged

Conversation

dennisdoomen
Copy link
Member

@dennisdoomen dennisdoomen commented Jan 24, 2018

Replaces all mechanisms and options to control whether or not an object has value semantics by a single algorithm: Any object that overrides object.Equals and is not an anonymous type is treated as a value type, unless ComparingByMembers() is used. Also removes the global AssertionOptions.IsValueType. For those cases where this algorithm misbehaves, ComparingByValue can be used.

#739

  • Initial implementation
  • Also treat tuples specially
  • Update extensibility docs
  • Update main docs on value equality

@dennisdoomen dennisdoomen changed the title Assuming types that override Equals to have value semantics [WIP] Assuming types that override Equals to have value semantics Jan 24, 2018
@dennisdoomen dennisdoomen force-pushed the DetectValueSemantics branch 4 times, most recently from 4d5032f to 7c08e11 Compare January 27, 2018 10:08
Replaced all mechanisms and options to control whether or not an object has value semantics by a single algorithm. Any object that overrides object.Equals and is not an anonymous type or tuple is treated as a value type, unless ComparingByMembers<T>() is used. Also removes the global AssertionOptions.IsValueType
@dennisdoomen dennisdoomen changed the title [WIP] Assuming types that override Equals to have value semantics Assuming types that override Equals to have value semantics Jan 27, 2018
@dennisdoomen dennisdoomen merged commit 530de04 into fluentassertions:release-5.0 Jan 27, 2018
@dennisdoomen dennisdoomen deleted the DetectValueSemantics branch January 27, 2018 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants