Skip to content

Commit 111bb4d

Browse files
added StretchyList unit tests
1 parent 9e304ed commit 111bb4d

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

inst/unitTests/cpp/misc.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,3 +133,12 @@ LogicalVector na_proxy(){
133133
) ;
134134
}
135135

136+
// [[Rcpp::export]]
137+
StretchyList stretchy_list(){
138+
StretchyList out ;
139+
out.push_back( 1 ) ;
140+
out.push_front( "foo" ) ;
141+
out.push_back( 3.2 ) ;
142+
return out;
143+
}
144+

inst/unitTests/runit.misc.R

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,4 +126,11 @@ test.na_proxy <- function(){
126126
)
127127
}
128128

129+
test.StretchyList <- function(){
130+
checkEquals(
131+
stretchy_list(),
132+
pairlist( "foo", 1L, 3.2 )
133+
)
134+
}
135+
129136
}

0 commit comments

Comments
 (0)