Skip to content

Commit 36cd8b9

Browse files
abandon useless test
1 parent fad3e62 commit 36cd8b9

File tree

3 files changed

+1
-16
lines changed

3 files changed

+1
-16
lines changed

inst/include/Rcpp/internal/wrap.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -921,10 +921,7 @@ inline SEXP module_wrap<SEXP>( const SEXP& obj ){
921921
}
922922

923923
inline SEXP wrap(const char* const v ){
924-
if (v != NULL)
925-
return Rf_mkString(v) ;
926-
else
927-
return R_NilValue;
924+
return Rf_mkString(v) ;
928925
}
929926

930927
/**

inst/unitTests/cpp/wrap.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -136,12 +136,6 @@ List multimap_string_generic(){
136136
return wrap(m);
137137
}
138138

139-
// [[Rcpp::export]]
140-
SEXP null_const_char(){
141-
const char *p = NULL;
142-
return wrap(p);
143-
}
144-
145139
// [[Rcpp::export]]
146140
SEXP nonnull_const_char(){
147141
const char *p = "foo";

inst/unitTests/runit.wrap.R

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,6 @@ test.wrap.multimap.string.generic <- function(){
9595
msg = "wrap( multimap<string,vector<int>>) " )
9696
}
9797

98-
test.null.const.char <- function() {
99-
checkEquals(null_const_char(),
100-
NULL,
101-
msg = "null const char*")
102-
}
103-
10498
test.nonnull.const.char <- function() {
10599
checkEquals(nonnull_const_char(),
106100
"foo",

0 commit comments

Comments
 (0)