[1] "`mtcars` should be type \"integer-like\" (is \"list\")"

alike(data.frame(), data.frame(a = 1:3, b = letters[1:3]))

alike(data.frame(a = integer(), b = factor()), data.frame(a = 1:3, 
    b = letters[1:3], stringsAsFactors = TRUE))

alike(data.frame(a = factor(), b = factor()), data.frame(a = 1:3, 
    b = letters[1:3]))

`data.frame(a = 1:3, b = letters[1:3])$a` should be class "factor" (is "integer")

[1] "`data.frame(a = 1:3, b = letters[1:3])$a` should be class \"factor\" (is \"integer\")"

alike(list(NULL, structure("a", class = "x")), list(NULL, structure("a", 
    class = "y")))

`list(NULL, structure("a", class = "y"))[[2]]` should be class "x" (is "y")

[1] "`list(NULL, structure(\"a\", class = \"y\"))[[2]]` should be class \"x\" (is \"y\")"

alike(list(integer(), data.frame(a = integer(), b = numeric()), 
    matrix(integer(), nrow = 3)), list(1:10, data.frame(a = 1:200, 
    b = runif(20)), matrix(1:27, nrow = 3)))

# row.names / names (note use `structure` to get around `data.frame` checks)

df.tpl <- structure(list(1:4, factor(LETTERS[1:4], levels = LETTERS)), 
    row.names = c("one", "", "", ""), names = c("id", ""), class = "data.frame")

df.cur <- `row.names<-`(data.frame(id = 5:8, val = factor(LETTERS[21:24], 
    levels = LETTERS)), c("one", "two", "tre", "qtr"))

df.cur2 <- `row.names<-`(data.frame(id = 5:8, val = factor(LETTERS[21:24], 
    levels = LETTERS)), c("uno", "due", "tre", "qtr"))

`names(df.tpl)[2]` should be "val" (is "")

[1] "`names(df.tpl)[2]` should be \"val\" (is \"\")"

`row.names(df.cur2)[1]` should be "one" (is "uno")

[1] "`row.names(df.cur2)[1]` should be \"one\" (is \"uno\")"

df.tpl <- structure(list(1:4, letters[1:4]), names = c("id", 
    NA), class = "data.frame")

df.cur <- structure(list(1:4, letters[1:4]), names = c("id", 
    "val"), class = "data.frame")

`names(df.cur)[2]` should be "NA" (is "val")

[1] "`names(df.cur)[2]` should be \"NA\" (is \"val\")"

[1] "`iris` should have 11 columns (has 5)"

`mtcars[1:10, ]` should have 32 rows (has 10)

[1] "`mtcars[1:10, ]` should have 32 rows (has 10)"