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:
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 toobjectas?expect_setequalonly says:object