Skip to content

Commit f2723e5

Browse files
committed
Revert "Add a unit test for push_back_name__impl"
This reverts commit 9ed6630.
1 parent d0faba6 commit f2723e5

File tree

2 files changed

+18
-37
lines changed

2 files changed

+18
-37
lines changed

inst/unitTests/cpp/Vector.cpp

Lines changed: 17 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -229,11 +229,11 @@ List integer_erase_range( IntegerVector x, IntegerVector y ){
229229
List integer_erase_range_2( IntegerVector x, IntegerVector y ){
230230
IntegerVector::iterator it = x.begin()+1 ;
231231
while( it != x.end() ){
232-
it = x.erase(it) ;
232+
it = x.erase(it) ;
233233
}
234234
it = y.begin() + 1 ;
235235
while( it != y.end() ){
236-
it = y.erase(it) ;
236+
it = y.erase(it) ;
237237
}
238238
return List::create( x, y ) ;
239239
}
@@ -242,11 +242,11 @@ List integer_erase_range_2( IntegerVector x, IntegerVector y ){
242242
List List_erase_range_2( List x, List y ){
243243
List::iterator it = x.begin()+1 ;
244244
while( it != x.end() ){
245-
it = x.erase(it) ;
245+
it = x.erase(it) ;
246246
}
247247
it = y.begin() + 1 ;
248248
while( it != y.end() ){
249-
it = y.erase(it) ;
249+
it = y.erase(it) ;
250250
}
251251
return List::create( x, y ) ;
252252
}
@@ -320,7 +320,7 @@ IntegerVector numeric_import(){
320320
NumericVector numeric_importtransform(){
321321
std::vector<double> v(10) ;
322322
for( int i=0; i<10; i++) v[i] = i ;
323-
323+
324324
return NumericVector::import_transform( v.begin(), v.end(), square ) ;
325325
}
326326

@@ -330,7 +330,7 @@ List list_ctor(){
330330
for( int i=0; i<10; i++) x[i] = Rf_ScalarInteger( i * 2) ;
331331
return x ;
332332
}
333-
333+
334334
// [[Rcpp::export]]
335335
List list_template_(){
336336
List x(4) ;
@@ -612,7 +612,7 @@ List character_listOf( List ll ){
612612
CharacterVector cv2 = ll["bar"];
613613
std::string rv1 = std::string(cv1[0]) + cv1[1] + cv1[2];
614614
std::string rv2 = std::string(cv2[0]) + cv2[1] + cv2[2];
615-
return List::create(_["foo"] = rv1, _["bar"] = rv2);
615+
return List::create(_["foo"] = rv1, _["bar"] = rv2);
616616
}
617617

618618
// [[Rcpp::export]]
@@ -671,7 +671,7 @@ List CharacterVectorEqualityOperator( CharacterVector x, CharacterVector y){
671671
LogicalVector eq(n), neq(n);
672672
for( int i=0; i<n; i++){
673673
eq[i] = x[i] == y[i] ;
674-
neq[i] = x[i] != y[i] ;
674+
neq[i] = x[i] != y[i] ;
675675
}
676676
return List::create(eq, neq) ;
677677
}
@@ -682,42 +682,42 @@ List List_rep_ctor(IntegerVector x){
682682
}
683683

684684
// [[Rcpp::export]]
685-
int stdVectorDouble(std::vector<double> x) {
685+
int stdVectorDouble(std::vector<double> x) {
686686
return x.size();
687687
}
688688

689689
// [[Rcpp::export]]
690-
int stdVectorDoubleConst(const std::vector<double> x) {
690+
int stdVectorDoubleConst(const std::vector<double> x) {
691691
return x.size();
692692
}
693693

694694
// [[Rcpp::export]]
695-
int stdVectorDoubleRef(std::vector<double> & x) {
695+
int stdVectorDoubleRef(std::vector<double> & x) {
696696
return x.size();
697697
}
698698

699699
// [[Rcpp::export]]
700-
int stdVectorDoubleConstRef(const std::vector<double> & x) {
700+
int stdVectorDoubleConstRef(const std::vector<double> & x) {
701701
return x.size();
702702
}
703703

704704
// [[Rcpp::export]]
705-
int stdVectorInt(std::vector<int> x) {
705+
int stdVectorInt(std::vector<int> x) {
706706
return x.size();
707707
}
708708

709709
// [[Rcpp::export]]
710-
int stdVectorIntConst(const std::vector<int> x) {
710+
int stdVectorIntConst(const std::vector<int> x) {
711711
return x.size();
712712
}
713713

714714
// [[Rcpp::export]]
715-
int stdVectorIntRef(std::vector<int> & x) {
715+
int stdVectorIntRef(std::vector<int> & x) {
716716
return x.size();
717717
}
718718

719719
// [[Rcpp::export]]
720-
int stdVectorIntConstRef(const std::vector<int> & x) {
720+
int stdVectorIntConstRef(const std::vector<int> & x) {
721721
return x.size();
722722
}
723723

@@ -733,20 +733,7 @@ std::string character_vector_const_proxy(const CharacterVector& str){
733733
CharacterVector CharacterVector_test_const_proxy(const CharacterVector x){
734734
CharacterVector out( x.size() ) ;
735735
for( int i=0; i<x.size(); i++){
736-
out[i] = x[i] ;
736+
out[i] = x[i] ;
737737
}
738738
return out ;
739739
}
740-
741-
extern int R_PPStackTop;
742-
743-
// [[Rcpp::export]]
744-
SEXP test_push_back_name__impl_no_names() {
745-
int save = R_PPStackTop;
746-
NumericVector x;
747-
x["foo"] = 1;
748-
if (R_PPStackTop != save) {
749-
throw Rcpp::exception("stack imbalance");
750-
}
751-
return x;
752-
}

inst/unitTests/runit.Vector.R

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -653,16 +653,10 @@ if (.runThisTest) {
653653
res <- character_vector_const_proxy( "fooo" )
654654
checkEquals( res, "fooo", msg = "CharacterVector const proxy. #32" )
655655
}
656-
656+
657657
test.CharacterVector.test.const.proxy <- function(){
658658
res <- CharacterVector_test_const_proxy( letters )
659659
checkEquals( res, letters )
660660
}
661-
662-
663-
test.push_back_name__impl_no_names <- function(){
664-
checkEquals( setNames(1, "foo"), test_push_back_name__impl_no_names(),
665-
"stack imbalance push_back_names__impl" )
666-
}
667661
}
668662

0 commit comments

Comments
 (0)