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
I'd expect the following test to pass: expect_setequal(list(a = 1:4, b = 4:1), list(b = 4:1, a = 1:4)), but it fails because the inputs are sorted with sort.int, which doesn't know how to handle a list.
I was attempting to replace a test of the form expect_equal(my_list[order(names(my_list))], list(a = 1:4, b = 4:1)).
If there's disagreement about whether these objects should be considered setequal, at the very least we need to document the acceptable types (atomic?) to be passed to object as ?expect_setequal only says:
object
object to test
The text was updated successfully, but these errors were encountered:
Created on 2019-03-28 by the reprex package (v0.2.1.9000)
But maybe expect_setequal() should use an implementation closer to setequal() and avoiding sorting. We could using something like all(vec_in(x, y)) && all(vec_in(y, x)). The error reporting will be a bit trickier though.
I'd expect the following test to pass:
expect_setequal(list(a = 1:4, b = 4:1), list(b = 4:1, a = 1:4))
, but it fails because the inputs are sorted withsort.int
, which doesn't know how to handle a list.I was attempting to replace a test of the form
expect_equal(my_list[order(names(my_list))], list(a = 1:4, b = 4:1))
.If there's disagreement about whether these objects should be considered
setequal
, at the very least we need to document the acceptable types (atomic?) to be passed toobject
as?expect_setequal
only says:object
The text was updated successfully, but these errors were encountered: