Skip to content

Commit 5c9ec23

Browse files
committed
Use output= for some all.equal tests
While not all all.equal() output is translated, those cases that are result in test failures when comparing the output in test() calls. Use output= so that the test would be skipped in 'foreign' mode.
1 parent 04c3110 commit 5c9ec23

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

inst/tests/tests.Rraw

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8712,17 +8712,17 @@ test(1613.21, all.equal(DT2, DT1, ignore.row.order = TRUE), "Dataset 'current' h
87128712
# test attributes: key
87138713
DT1 <- data.table(a = 1:4, b = letters[1:4], key = "a")
87148714
DT2 <- data.table(a = 1:4, b = letters[1:4])
8715-
test(1613.22, all.equal(DT1, DT2), "Datasets have different keys. 'target': [a]. 'current': has no key.")
8715+
test(1613.22, all.equal(DT1, DT2), output="Datasets have different keys. 'target': [a]. 'current': has no key.")
87168716
test(1613.23, all.equal(DT1, DT2, check.attributes = FALSE), TRUE)
87178717
test(1613.24, all.equal(DT1, setkeyv(DT2, "a"), check.attributes = TRUE), TRUE)
87188718
# test attributes: index
87198719
DT1 <- data.table(a = 1:4, b = letters[1:4])
87208720
DT2 <- data.table(a = 1:4, b = letters[1:4])
87218721
setindexv(DT1, "b")
8722-
test(1613.25, all.equal(DT1, DT2), "Datasets have different indices. 'target': [b]. 'current': has no index.")
8722+
test(1613.25, all.equal(DT1, DT2), output="Datasets have different indices. 'target': [b]. 'current': has no index.")
87238723
test(1613.26, all.equal(DT1, DT2, check.attributes = FALSE), TRUE)
8724-
test(1613.27, all.equal(DT1, setindexv(DT2, "a")), "Datasets have different indices. 'target': [b]. 'current': [a].")
8725-
test(1613.28, all.equal(DT1, setindexv(DT2, "b")), "Datasets have different indices. 'target': [b]. 'current': [a, b].")
8724+
test(1613.27, all.equal(DT1, setindexv(DT2, "a")), output="Datasets have different indices. 'target': [b]. 'current': [a].")
8725+
test(1613.28, all.equal(DT1, setindexv(DT2, "b")), output="Datasets have different indices. 'target': [b]. 'current': [a, b].")
87268726
test(1613.29, all.equal(DT1, setindexv(setindexv(DT2, NULL), "b")), TRUE)
87278727
# test custom attribute
87288728
DT1 <- data.table(a = 1:4, b = letters[1:4])

0 commit comments

Comments
 (0)