-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
AllMembersSupplier treats single and array datapoint parameter type matching differently #637
Comments
I can get behind the idea of always using runtime type info. Thanks for raising this. |
dsaff
pushed a commit
that referenced
this issue
Mar 19, 2013
Fixes for #637, making theory parameters assignment more consistent across sources
I think this issue can be closed; the pull request was merged and the release notes document the changes. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
(This is primarily a note for me to fix this shortly, since I've come up against it in #639)
This fails, saying no valid parameters were found:
This meanwhile, happily passes, using the parameter from the array:
In addition, this doesn't pass (while the single
@DataPoint
equivalent does), as it finds no parameters:This is because of two closely related problems:
I'd suggest that either all fields and methods are based purely on whether the static type is assignable (e.g. Object fields are never used for Integer parameters, even if the values are Integers), or that parameters are always considered on their value (i.e. field type is irrelevant, as long as the values can be used for the given parameter).
I think the second is more intuitive myself; any datapoint that can be legitimately used for a parameter should be. Also because I've got another nearly finished implementation for Iterable datapoints that requires that behaviour, as you can't get the type of an Iterable directly, unlike with String[], so you have to always examine these values.
The text was updated successfully, but these errors were encountered: