Skip to content

Commit d541611

Browse files
authored
Bugfix/expressionvector test (#567)
* expression vector test correction as discussed in #566, with thanks to Nathan Russell * brown bag fix * and another one
1 parent afa6471 commit d541611

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2016-10-23 Nathan Russell <[email protected]>
2+
3+
* inst/unitTests/runit.dispatch.R (test.ExpressionVector): Use
4+
expression rather than parse, correct typo
5+
16
2016-10-21 Qiang Kou <[email protected]>
27

38
* inst/include/Rcpp/barrier.h: Change string_elt/vector_elt to accept R_xlen_t

inst/NEWS.Rd

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616
\code{rowMeans()}, \code{colMeans()} (PR \ghpr{551} by Nathan Russell
1717
fixing \ghit{549})
1818
}
19+
\item Changes in Rcpp unit tests
20+
\itemize{
21+
\item A test for expression vectors was corrected.
22+
}
1923
\item Updated Date and Datetime vector classes:
2024
\itemize{
2125
\item The \code{DateVector} and \code{DatetimeVector} classes were renamed

inst/unitTests/runit.dispatch.R

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
#!/usr/bin/env r
22
# -*- mode: R; tab-width: 4; -*-
33
#
4-
# Copyright (C) 2009 - 2014 Dirk Eddelbuettel and Romain Francois
4+
# Copyright (C) 2009 - 2016 Dirk Eddelbuettel and Romain Francois
5+
# Copyright (C) 2016 Dirk Eddelbuettel, Romain Francois and Nathan Russell
56
#
67
# This file is part of Rcpp.
78
#
@@ -44,8 +45,8 @@ if (.runThisTest) {
4445
}
4546

4647
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)")
48+
x <- expression(rnorm, rnorm(10), mean(1:10))
49+
checkEquals(first_el(x), x[1], msg = "RCPP_RETURN_VECTOR (expression)")
4950
}
5051

5152
test.GenericVector <- function() {

0 commit comments

Comments
 (0)