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 type cast bug in ParamArrayMatcher #912

Merged
merged 3 commits into from
Aug 29, 2019

Conversation

stakx
Copy link
Contributor

@stakx stakx commented Aug 29, 2019

No description provided.

@stakx stakx added this to the 4.13.0 milestone Aug 29, 2019
If `canCastValueToT` check added in the previous commit is extracted
and reused in `Match.SetupEvaluatedSuccessfully` (where the same type
of cast happens) as an assertion, that assertion will trigger. There's
a bug in `ParamArrayMatcher`.
The assertion added in the last commit can be more easily understood
if the relationship between these two methods is made more explicit.
Let's do so via assertions.
@stakx stakx merged commit d6eaa92 into devlooped:master Aug 29, 2019
@stakx stakx deleted the paramarraymatcher branch August 29, 2019 22:03
ishimko pushed a commit to ishimko/moq4 that referenced this pull request Sep 2, 2019
* `Capture.In` does not work in `params` parameter

   If `canCastValueToT` check added in the previous commit is extracted
   and reused in `Match.SetupEvaluatedSuccessfully` (where the same type
   of cast happens) as an assertion, that assertion will trigger. There's
   a bug in `ParamArrayMatcher`.

* Fix bug by fanning out array into its elements

* Document relationship between `Matches`, `SetupEvaluatedSuccessfully`

   The assertion added in the last commit can be more easily understood
   if the relationship between these two methods is made more explicit.
   Let's do so via even more assertions. :)
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

1 participant