You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ProvenanceTest: assert that matched ops actually match #83
The problem here is that these Ops will actually not be identical, as currently written.
DefaultOpEnvironment.opFromInfoChain creates a new Op every time. This is because the opCache is keyed on MatchingConditions (the combined OpRef and Hints); we have neither of these when we want to call this method. For that reason, in the majority of cases the two Ops created will not be the same. We could ensure that they are from the same Class, I suppose...
In the case of test you commented on, that Op is a Function adapted from a Computers.Arity1, so it would take reflection to check equality beyond the wrapper (which is still worth testing, I think)
Activity
gselzer commentedon Jan 21, 2022
The problem here is that these Ops will actually not be identical, as currently written.
DefaultOpEnvironment.opFromInfoChaincreates a new Op every time. This is because theopCacheis keyed onMatchingConditions(the combinedOpRefandHints); we have neither of these when we want to call this method. For that reason, in the majority of cases the two Ops created will not be the same. We could ensure that they are from the sameClass, I suppose...gselzer commentedon Jan 21, 2022
In the case of test you commented on, that Op is a
Functionadapted from aComputers.Arity1, so it would take reflection to check equality beyond the wrapper (which is still worth testing, I think)Merge pull request #83 from scijava/scijava/scijava-ops-api/remove-va…