Skip to content

Commit 6fc1590

Browse files
author
Bill Evans
committed
reduce tests to simply between()
1 parent 4789cdf commit 6fc1590

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

inst/tests/tests.Rraw

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21142,12 +21142,12 @@ test(2314.1, any(grepl("<int>", tail(capture.output(print(dt, class = TRUE)), 2)
2114221142
# Test that class=TRUE with col.names="top" doesn't show classes at bottom
2114321143
test(2314.2, !any(grepl("<int>", tail(capture.output(print(dt, class = TRUE, col.names = "top")), 2))), TRUE)
2114421144

21145-
# Test that tzone behavior stops warning with ignore_tzone=TRUE
21145+
# issue #6898, test that tzone behavior changes with ignore_tzone=TRUE
2114621146
tm1 = .POSIXct(1, "UTC")
21147-
dt1 = data.table(a = .POSIXct(0), b = .POSIXct(2, "UTC"))
21148-
test(2315.1, dt1[, between(tm1, a, b)], error = "different tzone attributes")
21149-
test(2315.2, dt1[, between(tm1, a, b, ignore_tzone=TRUE)])
21147+
tms1 = list(.POSIXct(0), .POSIXct(2, "UTC"))
21148+
test(2315.1, between(tm1, tms1[[1]], tms1[[2]]), error = "different tzone attributes")
21149+
test(2315.2, between(tm1, tms1[[1]], tms1[[2]], ignore_tzone=TRUE))
2115021150
tm2 <- .POSIXct(1)
21151-
dt2 = data.table(a = .POSIXct(0, "UTC"), b = .POSIXct(2, "UTC"))
21152-
test(2315.3, dt2[, between(tm2, a, b)], message = "mismatched tzone attributes")
21153-
test(2315.4, dt2[, between(tm2, a, b)])
21151+
tms2 = list(.POSIXct(0, "UTC"), .POSIXct(2, "UTC"))
21152+
test(2315.3, between(tm2, tms2[[1]], tms2[[2]]), message = "mismatched tzone attributes")
21153+
test(2315.4, between(tm2, tms2[[1]], tms2[[2]], ignore_tzone=TRUE))

0 commit comments

Comments
 (0)