Skip to content

Commit 9a0438d

Browse files
combine old & new tests
1 parent 615acd2 commit 9a0438d

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

inst/tests/tests.Rraw

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15879,8 +15879,11 @@ test(2074.03, data.table(grade=c(50L, 91L, 95L, 51L, 89L))[ , .N, by=evaluate(gr
1587915879
data.table(evaluate=c('F', 'A', 'B'), N=c(2L, 2L, 1L)))
1588015880
## error: use recursive character list indexing to assign when also doing alloc.col()
1588115881
opt = options(datatable.alloccol=1L)
15882-
l = list(foo = list(bar = data.table(a = 1:3, b = 4:6)))
15883-
test(2074.04, l[[c('foo', 'bar')]][ , (letters) := 16:18], error='Invalid set* operation on a recursive index L[[i]]')
15882+
l = list(foo=list(bar=data.frame(a=1:3, b=4:6)))
15883+
test(2074.041, setDT(l[[c('foo', 'bar')]]), error='Invalid set* operation on a recursive index L[[i]]')
15884+
setDT(l[['foo']][['bar']])
15885+
test(2074.042, is.data.table(l[[c('foo', 'bar')]]))
15886+
test(2074.043, l[[c('foo', 'bar')]][ , (letters) := 16:18], error='Invalid set* operation on a recursive index L[[i]]')
1588415887
options(opt)
1588515888
## alloc.col when using 0-truelength j assigning to a subset
1588615889
DT = data.table(a=1)
@@ -21167,9 +21170,3 @@ test(2317.6, DT1[DF1, on='a', .(d = x.a + i.d)]$d, 5)
2116721170
test(2317.7, DT1[DF2, on='a', e := i.e]$e, 5)
2116821171
test(2317.8, DT1[DF2, on='a', e2 := x.a + i.e]$e2, 6)
2116921172
test(2317.9, DT1[DF2, on='a', .(e = x.a + i.e)]$e, 6)
21170-
21171-
# Test for issue #6702
21172-
test(2318.1, {
21173-
data_store = list(nested = list(df_to_fix = data.frame(id = 1:3, val = letters[1:3])))
21174-
setDT(data_store[[c("nested", "df_to_fix")]])
21175-
}, error = "Cannot assign with a recursive index of length")

0 commit comments

Comments
 (0)