|
21 | 21 | if (!.runThisTest) exit_file("Skipping, set 'RunAllRcppTests=yes' to run.") |
22 | 22 |
|
23 | 23 | library(Rcpp) |
24 | | -sourceCpp("cpp/RObject") |
| 24 | +sourceCpp("cpp/RObject.cpp") |
25 | 25 |
|
26 | 26 | # test.RObject.asDouble <- function(){ |
27 | 27 | expect_equal( asDouble(2.123), 4.246, info = "as<double>( REALSXP ) " ) |
@@ -108,7 +108,6 @@ expect_equal( asStdVectorBool(x=c(1.0, 0.0)), c(FALSE, TRUE), info = "as< std::v |
108 | 108 | expect_equal( asStdVectorBool(x=as.raw(c(1,0))), c(FALSE, TRUE), info = "as< std::vector<bool> >(raw)" ) |
109 | 109 | expect_error( asStdVectorBool("foo"), info = "as< std::vector<bool> >(character) -> exception" ) |
110 | 110 | expect_error( asStdVectorBool(NULL), info = "as< std::vector<bool> >(NULL) -> exception" ) |
111 | | - } |
112 | 111 |
|
113 | 112 | # test.RObject.asStdVectorString <- function(){ |
114 | 113 | expect_equal( asStdVectorString(c("foo", "bar")), c("foofoo", "barbar"), info = "as< std::vector<std::string> >(character)" ) |
@@ -153,7 +152,8 @@ expect_true( !isNULL(1L), info = "RObject.isNULL(integer) -> false" ) |
153 | 152 | expect_true( !isNULL(1.0), info = "RObject.isNULL(numeric) -> false" ) |
154 | 153 | expect_true( !isNULL(as.raw(1)), info = "RObject.isNULL(raw) -> false" ) |
155 | 154 | expect_true( !isNULL(letters), info = "RObject.isNULL(character) -> false") |
156 | | -expect_true( !isNULL(test.RObject.isNULL), info = "RObject.isNULL(function) -> false" ) |
| 155 | +#expect_true( !isNULL(test.RObject.isNULL), info = "RObject.isNULL(function) -> false" ) |
| 156 | +expect_true( !isNULL(base::ls), info = "RObject.isNULL(function) -> false" ) |
157 | 157 | expect_true( !isNULL(.GlobalEnv), info = "RObject.isNULL(environment) -> false" ) |
158 | 158 | expect_true( isNULL(NULL), info = "RObject.isNULL(NULL) -> true" ) |
159 | 159 |
|
|
0 commit comments