Skip to content

Commit 272fc59

Browse files
committed
add test cases
1 parent c55bfcc commit 272fc59

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

inst/tests/tests.Rraw

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20596,3 +20596,12 @@ test(2295.3, is.data.table(d2))
2059620596

2059720597
# #6588: .checkTypos used to give arbitrary strings to stopf as the first argument
2059820598
test(2296, d2[x %no such operator% 1], error = '%no such operator%')
20599+
20600+
# coerce Dates to double if join on multiple columns, #6602
20601+
date_int = seq(as.Date('2015-01-01'), as.Date('2015-01-01'), by="day")
20602+
date_dbl = as.Date('2015-01-01')
20603+
x = data.table(a=date_int, b=1L)
20604+
y = data.table(c=date_int, d=date_dbl)
20605+
20606+
test(2297.1, options=c(datatable.verbose=TRUE), y[x, on=.(c == a)], data.table(c=date_int, d=date_dbl, b=1L), output="No coercion needed.")
20607+
test(2297.2, options=c(datatable.verbose=TRUE), y[x, on=.(c == a, d == a)], data.table(c=date_dbl, d=date_dbl, b=1L), output="coercing to double.")

0 commit comments

Comments
 (0)