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
This is the same as #473. That previous issue was indirectly considered resolved by the implementation expect_setequal, but that's not what I had in mind. expect_setequal tests that two sortable vectors have the same contents, but what I had in mind was that two named vectors (including lists, which aren't generally sortable) would be tested to have the same key-value pairs.
The idea is that a and b below would be considered to be equivalent:
a<-list(x="a", y=2)
b<-list(y=2, x="a")
But these would not:
a<-list(x="a", y=2)
c<-list(x="a", z=2)
It was closed before because @hadley thought that doing it well would require quite a bit of code, but I don't think that's necessarily true -- I had a basic implementation of it in the previous issue.
The text was updated successfully, but these errors were encountered:
I like expect_mapequal(). Although there is the odd case where a named vector has multiple entries with the same name. I'm not sure how we want to handle that.
This is the same as #473. That previous issue was indirectly considered resolved by the implementation
expect_setequal
, but that's not what I had in mind.expect_setequal
tests that two sortable vectors have the same contents, but what I had in mind was that two named vectors (including lists, which aren't generally sortable) would be tested to have the same key-value pairs.The idea is that
a
andb
below would be considered to be equivalent:But these would not:
It was closed before because @hadley thought that doing it well would require quite a bit of code, but I don't think that's necessarily true -- I had a basic implementation of it in the previous issue.
The text was updated successfully, but these errors were encountered: