Skip to content

Commit f672489

Browse files
new unit test, that intentionally fail for now. to be fixed
1 parent f6d00a6 commit f672489

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2013-09-28 Romain Francois <romain@r-enthusiasts.com>
2+
3+
* inst/unitTests/cpp/Module.cpp: Making sure Rcp is not released before this
4+
is fixed
5+
16
2013-09-27 Dirk Eddelbuettel <edd@debian.org>
27

38
* vignettes/Rcpp-unitTests.Rnw: Re-activated vignette

inst/unitTests/cpp/Module.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ class World {
6161
public:
6262
World() : msg("hello"){}
6363
void set(std::string msg_) { this->msg = msg_; }
64+
void set_ref(std::string& msg_) { this->msg = msg_; }
65+
void set_const_ref(const std::string& msg_) { this->msg = msg_; }
6466
std::string greet() { return msg; }
6567

6668
private:
@@ -155,6 +157,8 @@ RCPP_MODULE(yada){
155157

156158
.method( "greet", &World::greet )
157159
.method( "set", &World::set )
160+
.method( "set_ref", &World::set_ref )
161+
.method( "set_const_ref", &World::set_const_ref )
158162
.method( "clear", &clearWorld )
159163
;
160164

0 commit comments

Comments
 (0)