File tree Expand file tree Collapse file tree 2 files changed +46
-48
lines changed
Expand file tree Collapse file tree 2 files changed +46
-48
lines changed Original file line number Diff line number Diff line change @@ -196,23 +196,6 @@ List unordered_map_string_generic(){
196196 return wrap (m);
197197}
198198
199-
200- RCPP_EXPOSED_CLASS (Foo)
201- class Foo{
202- public:
203- Foo () : x (0.0 ){}
204- Foo ( double x_ ) : x (x_){}
205- double get () { return x ; }
206- private:
207- double x ;
208- } ;
209- RCPP_MODULE (mod){
210- class_<Foo>(" Foo" )
211- .constructor <double >()
212- .method ( " get" , &Foo::get )
213- ;
214- }
215-
216199// [[Rcpp::export]]
217200SEXP map_int_double (){
218201 std::map<int , double > map ;
@@ -241,19 +224,35 @@ SEXP map_int_vector_double(){
241224 return wrap ( map ) ;
242225}
243226
244- // [[Rcpp::export]]
245- SEXP map_int_Foo (){
246- std::map<int , Foo> map ;
247- map[0 ] = Foo ( 2 ) ;
248- map[1 ] = Foo ( 3 ) ;
249- return wrap ( map ) ;
250- }
251-
252- // [[Rcpp::export]]
253- SEXP vector_Foo (){
254- std::vector<Foo> vec (2 ) ;
255- vec[0 ] = Foo ( 2 ) ;
256- vec[1 ] = Foo ( 3 ) ;
257- return wrap (vec) ;
258- }
227+ // RCPP_EXPOSED_CLASS(Foo)
228+ // class Foo{
229+ // public:
230+ // Foo() : x(0.0){}
231+ // Foo( double x_ ) : x(x_){}
232+ // double get() { return x ; }
233+ // private:
234+ // double x ;
235+ // } ;
236+ // RCPP_MODULE(mod){
237+ // class_<Foo>("Foo")
238+ // .constructor<double>()
239+ // .method( "get", &Foo::get )
240+ // ;
241+ // }
242+ //
243+ // // [[Rcpp::export]]
244+ // SEXP map_int_Foo(){
245+ // std::map<int, Foo> map ;
246+ // map[0] = Foo( 2 ) ;
247+ // map[1] = Foo( 3 ) ;
248+ // return wrap( map ) ;
249+ // }
250+ //
251+ // // [[Rcpp::export]]
252+ // SEXP vector_Foo(){
253+ // std::vector<Foo> vec(2) ;
254+ // vec[0] = Foo( 2 ) ;
255+ // vec[1] = Foo( 3 ) ;
256+ // return wrap(vec) ;
257+ // }
259258
Original file line number Diff line number Diff line change 1818# along with Rcpp. If not, see <http://www.gnu.org/licenses/>.
1919
2020.runThisTest <- Sys.getenv(" RunAllRcppTests" ) == " yes"
21- .runThisTest <- FALSE
2221
2322if (.runThisTest ) {
2423
@@ -168,21 +167,21 @@ test.wrap.map.int.vector_double <- function(){
168167 )
169168}
170169
171- test.wrap.map.int.Foo <- function (){
172- checkEquals(
173- sapply( map_int_Foo(), function (. ) . $ get() ),
174- c(" 0" = 2 , " 1" = 3 ),
175- msg = " std::map<int, MODULE EXPOSED CLASS >"
176- )
177- }
178-
179- test.wrap.vector.Foo <- function (){
180- checkEquals(
181- sapply( vector_Foo(), function (. ) . $ get() ),
182- c(2 , 3 ),
183- msg = " std::vector< MODULE EXPOSED CLASS >"
184- )
185- }
170+ # test.wrap.map.int.Foo <- function(){
171+ # checkEquals(
172+ # sapply( map_int_Foo(), function(.) .$get() ),
173+ # c("0" = 2, "1" = 3 ),
174+ # msg = "std::map<int, MODULE EXPOSED CLASS >"
175+ # )
176+ # }
177+ #
178+ # test.wrap.vector.Foo <- function(){
179+ # checkEquals(
180+ # sapply( vector_Foo(), function(.) .$get() ),
181+ # c(2, 3),
182+ # msg = "std::vector< MODULE EXPOSED CLASS >"
183+ # )
184+ # }
186185
187186}
188187
You can’t perform that action at this time.
0 commit comments