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

Fix equality check bug in ExpressionKey #363

Merged
merged 3 commits into from
Jun 11, 2017

Commits on Jun 11, 2017

  1. Issue 135: Fix equality check bug in ExpressionKey

    The equality check in ExpressionKey is wrong. The check must be
    conjunction (&), but not disjunction(|), because then the values don't
    matter in that check and they are just skipped. So, invocations:
    
     aMock.Setup(m => m.Foo(i1, i2));
     aMock.Setup(m => m.Foo(i2, i1));
    
    have the same expression key, but this is not correct.
    kostadinmarinov authored and stakx committed Jun 11, 2017
    Configuration menu
    Copy the full SHA
    6984b88 View commit details
    Browse the repository at this point in the history
  2. Issue 135: Apply corrections

     1. Fix `ExpressionKey.Equals` so that it works correctly for boxed
        value types (by using object.Equals instead of ==).
    
     2. Update the test code (xUnit no longer has `Assert.DoesNotThrow`).
    stakx committed Jun 11, 2017
    Configuration menu
    Copy the full SHA
    ca09e4a View commit details
    Browse the repository at this point in the history
  3. Test ExpressionKey.Equals against bad hashcodes

    Issue 328 revealed that ExpressionKey did not perform equality check-
    ing correctly for objects with the same hash code. This commit adds
    tests for that specific scenario.
    stakx committed Jun 11, 2017
    Configuration menu
    Copy the full SHA
    829804b View commit details
    Browse the repository at this point in the history