Skip to content

Commit ad5b427

Browse files
authored
unit tests for #3779 (#4576)
1 parent 11f2d7e commit ad5b427

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

inst/tests/tests.Rraw

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17709,10 +17709,15 @@ test(2191, DT[1:5, sum(v), by=.(i5 = 1:5 %% 2L), verbose=TRUE], data.table(i5=1:
1770917709
test(2192.1, as.IDate(c('', '2020-01-01')), structure(c(NA_integer_, 18262L), class=c("IDate","Date")))
1771017710
test(2192.2, as.IDate(c('2020-01-01', '')), structure(c(18262L, NA_integer_), class=c("IDate","Date")))
1771117711

17712-
# subassign coerce to integer64 was fixed in 1.12.4, #2530
1771317712
if (test_bit64) {
17713+
# subassign coerce to integer64 was fixed in 1.12.4, #2530
1771417714
DT = data.table(a = as.integer64(1:10))
1771517715
DT[a==1, a:=12]
1771617716
DT[a==2, a:=as.integer64(13)]
17717-
test(2193, DT, data.table(a = as.integer64(c(12,13,3:10))))
17717+
test(2193.1, DT, data.table(a = as.integer64(c(12,13,3:10))))
17718+
17719+
# X[Y,,by=.EACHI] when Y contains integer64 also fixed in 1.12.4, #3779
17720+
X = data.table(x=1:3)
17721+
Y = data.table(x=1:2, y=as.integer64(c(10,20)))
17722+
test(2193.2, X[Y, `:=`(y=i.y), on="x", by=.EACHI], data.table(x=1:3, y=as.integer64(10L,20L,NA)))
1771817723
}

0 commit comments

Comments
 (0)