Skip to content

Commit 14ba7ef

Browse files
committed
Fix dispatch.h unit tests
1 parent 8bf6262 commit 14ba7ef

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

inst/unitTests/runit.dispatch.R

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,7 @@ if (.runThisTest) {
2727
x <- as.raw(0:9)
2828
checkEquals(first_el(x), x[1], msg = "RCPP_RETURN_VECTOR (raw)")
2929
}
30-
31-
test.ExpressionVector <- function() {
32-
x <- as.expression(0:9)
33-
checkEquals(first_el(x), x[1], msg = "RCPP_RETURN_VECTOR (expression)")
34-
}
35-
30+
3631
test.ComplexVector <- function() {
3732
x <- as.complex(0:9)
3833
checkEquals(first_el(x), x[1], msg = "RCPP_RETURN_VECTOR (complex)")
@@ -49,7 +44,7 @@ if (.runThisTest) {
4944
}
5045

5146
test.GenericVector <- function() {
52-
x <- as.list(0:9)
47+
x <- list("foo", 10L, 10.2, FALSE)
5348
checkEquals(first_el(x), x[1], msg = "RCPP_RETURN_VECTOR (list)")
5449
}
5550

@@ -63,11 +58,6 @@ if (.runThisTest) {
6358
checkEquals(first_cell(x), x[1, 1, drop = FALSE], msg = "RCPP_RETURN_MATRIX (raw)")
6459
}
6560

66-
test.ExpressionMatrix <- function() {
67-
x <- matrix(as.expression(0:9), ncol = 2L)
68-
checkEquals(first_cell(x), x[1, 1, drop = FALSE], msg = "RCPP_RETURN_MATRIX (expression)")
69-
}
70-
7161
test.ComplexMatrix <- function() {
7262
x <- matrix(as.complex(0:9), ncol = 2L)
7363
checkEquals(first_cell(x), x[1, 1, drop = FALSE], msg = "RCPP_RETURN_MATRIX (complex)")
@@ -84,7 +74,7 @@ if (.runThisTest) {
8474
}
8575

8676
test.GenericMatrix <- function() {
87-
x <- matrix(lapply(0:9, function(.) as.list(0:9)), ncol = 2L)
77+
x <- matrix(lapply(0:9, function(.) 0:9), ncol = 2L)
8878
checkEquals(first_cell(x), x[1, 1, drop = FALSE], msg = "RCPP_RETURN_MATRIX (list)")
8979
}
9080

0 commit comments

Comments
 (0)