vetr:::attr_compare(structure(list(), class = letters[2:4]), 
    structure(list("hello"), class = letters[1:4]))

vetr:::attr_compare(matrix(integer(), 3), matrix(integer(), 3, 
    3), 1)

# dim mismatch, but passes because comparison is `alike`

vetr:::attr_compare(matrix(integer(), 3, 3), matrix(integer(), 
    3, 3), 1)

vetr:::attr_compare(matrix(integer(), 3, 3, dimnames = list(NULL, 
    letters[1:3])), matrix(integer(), 3, 3, dimnames = list(LETTERS[1:3], 
    letters[1:3])), attr.mode = 1)

# dimnames mismatch, but alike so passes

vetr:::attr_compare(matrix(integer(), 3, 3, dimnames = list(LETTERS[1:3], 
    letters[1:3])), matrix(integer(), 3, 3, dimnames = list(a = LETTERS[1:3], 
    b = letters[1:3])), attr.mode = 1)

# dimnames mismatch, but passes because target has NULL names

vetr:::attr_compare(matrix(integer(), 3, 3, dimnames = list(a = LETTERS[1:3], 
    b = letters[1:3])), matrix(integer(), 3, 3, dimnames = list(LETTERS[1:3], 
    letters[1:3])), attr.mode = 1)

# dimnames mismatch, but here fails because target has them but current doesnt

be
`alike` the corresponding element in target

$success
[1] 0

$message
$message$message
[1] "be"                                         
[2] "`alike` the corresponding element in target"
[3] ""                                           
[4] ""                                           

$message$wrap
$message$wrap[[1]]
dimnames(NULL)

$message$wrap[[2]]
$message$wrap[[2]][[1]]
NULL




$df
[1] 0

$lvl
[1] 6

vetr:::attr_compare(matrix(integer(), 3, 3, dimnames = list(A = LETTERS[1:3], 
    letters[1:3])), matrix(integer(), 3, 3, dimnames = list(a = LETTERS[1:3], 
    b = letters[1:3])), attr.mode = 1)

# actually passes because both have 2 length character name attrs, which are
# alike

vetr:::attr_compare(structure(list(integer(), character())), 
    data.frame(a = 1:10, b = letters[1:10]), attr.mode = 1)

vetr:::attr_compare(structure(list(integer(), character()), class = "data.frame"), 
    data.frame(a = 1:10, b = letters[1:10]), attr.mode = 1)