@@ -27,12 +27,7 @@ if (.runThisTest) {
27
27
x <- as.raw(0 : 9 )
28
28
checkEquals(first_el(x ), x [1 ], msg = " RCPP_RETURN_VECTOR (raw)" )
29
29
}
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
+
36
31
test.ComplexVector <- function () {
37
32
x <- as.complex(0 : 9 )
38
33
checkEquals(first_el(x ), x [1 ], msg = " RCPP_RETURN_VECTOR (complex)" )
@@ -49,7 +44,7 @@ if (.runThisTest) {
49
44
}
50
45
51
46
test.GenericVector <- function () {
52
- x <- as. list(0 : 9 )
47
+ x <- list (" foo " , 10L , 10.2 , FALSE )
53
48
checkEquals(first_el(x ), x [1 ], msg = " RCPP_RETURN_VECTOR (list)" )
54
49
}
55
50
@@ -63,11 +58,6 @@ if (.runThisTest) {
63
58
checkEquals(first_cell(x ), x [1 , 1 , drop = FALSE ], msg = " RCPP_RETURN_MATRIX (raw)" )
64
59
}
65
60
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
-
71
61
test.ComplexMatrix <- function () {
72
62
x <- matrix (as.complex(0 : 9 ), ncol = 2L )
73
63
checkEquals(first_cell(x ), x [1 , 1 , drop = FALSE ], msg = " RCPP_RETURN_MATRIX (complex)" )
@@ -84,7 +74,7 @@ if (.runThisTest) {
84
74
}
85
75
86
76
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 )
88
78
checkEquals(first_cell(x ), x [1 , 1 , drop = FALSE ], msg = " RCPP_RETURN_MATRIX (list)" )
89
79
}
90
80
0 commit comments