Skip to content

Commit fa1a4d6

Browse files
committed
Add unit test for the RCPP_RETURN_VECTOR with EXPRSXP
1 parent 14ba7ef commit fa1a4d6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

inst/unitTests/runit.dispatch.R

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ if (.runThisTest) {
4343
checkEquals(first_el(x), x[1], msg = "RCPP_RETURN_VECTOR (numeric)")
4444
}
4545

46+
test.ExpressionVector <- function() {
47+
x <- parse(text = "rnrom; rnrom(10); mean(1:10)")
48+
checkEquals(first_el(x), x[1], msg = "RCPP_RETURN_VECTOR (numeric)")
49+
}
50+
4651
test.GenericVector <- function() {
4752
x <- list("foo", 10L, 10.2, FALSE)
4853
checkEquals(first_el(x), x[1], msg = "RCPP_RETURN_VECTOR (list)")

0 commit comments

Comments
 (0)