Skip to content

Commit 1e2d9b1

Browse files
authored
Merge pull request #1044 from RcppCore/feature/more_nocov
Feature/more nocov
2 parents 2a7278e + f77a4e7 commit 1e2d9b1

File tree

3 files changed

+49
-49
lines changed

3 files changed

+49
-49
lines changed

inst/include/Rcpp/exceptions_impl.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ namespace Rcpp {
2626
#include <execinfo.h>
2727

2828
// Extract mangled name e.g. ./test(baz+0x14)[0x400962]
29-
static std::string demangler_one(const char* input) {
29+
static std::string demangler_one(const char* input) { // #nocov start
3030
static std::string buffer;
3131
buffer = input;
3232
size_t last_open = buffer.find_last_of('(');
@@ -84,6 +84,6 @@ namespace Rcpp {
8484
_["line" ] = -1,
8585
_["stack"] = res);
8686
trace.attr("class") = "Rcpp_stack_trace";
87-
rcpp_set_stack_trace(trace);
87+
rcpp_set_stack_trace(trace); // #nocov end
8888
}
8989
};

inst/include/Rcpp/generated/Vector__create.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -173,21 +173,21 @@
173173
}
174174

175175
template <typename T1, typename T2, typename T3>
176-
static Vector create__dispatch( traits::true_type, const T1& t1, const T2& t2, const T3& t3){
177-
Vector res( 3 ) ;
178-
Shield<SEXP> names( ::Rf_allocVector( STRSXP, 3 ) ) ;
179-
int index = 0 ;
180-
iterator it( res.begin() );
176+
static Vector create__dispatch( traits::true_type, const T1& t1, const T2& t2, const T3& t3){ // #nocov start
177+
Vector res( 3 ) ;
178+
Shield<SEXP> names( ::Rf_allocVector( STRSXP, 3 ) ) ;
179+
int index = 0 ;
180+
iterator it( res.begin() );
181181

182-
////
182+
////
183183
replace_element( it, names, index, t1 ) ; ++it; ++index ;
184184
replace_element( it, names, index, t2 ) ; ++it; ++index ;
185185
replace_element( it, names, index, t3 ) ; ++it; ++index ;
186-
////
186+
////
187187

188-
res.attr("names") = names ;
188+
res.attr("names") = names ;
189189

190-
return res ;
190+
return res ; // #nocov end
191191
}
192192

193193
public:

src/api.cpp

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// api.cpp: Rcpp R/C++ interface class library -- Rcpp api
44
//
5-
// Copyright (C) 2012 - 2019 Dirk Eddelbuettel and Romain Francois
5+
// Copyright (C) 2012 - 2020 Dirk Eddelbuettel and Romain Francois
66
//
77
// This file is part of Rcpp.
88
//
@@ -53,7 +53,7 @@ namespace Rcpp {
5353
}
5454

5555
// [[Rcpp::register]]
56-
unsigned long beginSuspendRNGSynchronization() {// #nocov start
56+
unsigned long beginSuspendRNGSynchronization() { // #nocov start
5757
++rngSynchronizationSuspended;
5858
return rngSynchronizationSuspended;
5959
}
@@ -62,7 +62,7 @@ namespace Rcpp {
6262
unsigned long endSuspendRNGSynchronization() {
6363
--rngSynchronizationSuspended;
6464
return rngSynchronizationSuspended;
65-
} // #nocov end
65+
} // #nocov end
6666

6767
// [[Rcpp::register]]
6868
char* get_string_buffer() {
@@ -73,36 +73,36 @@ namespace Rcpp {
7373
}
7474

7575
// [[Rcpp::register]]
76-
const char * type2name(SEXP x) { // #nocov start
76+
const char * type2name(SEXP x) { // #nocov start
7777
switch (TYPEOF(x)) {
78-
case NILSXP: return "NILSXP";
79-
case SYMSXP: return "SYMSXP";
80-
case RAWSXP: return "RAWSXP";
81-
case LISTSXP: return "LISTSXP";
82-
case CLOSXP: return "CLOSXP";
83-
case ENVSXP: return "ENVSXP";
84-
case PROMSXP: return "PROMSXP";
85-
case LANGSXP: return "LANGSXP";
86-
case SPECIALSXP: return "SPECIALSXP";
87-
case BUILTINSXP: return "BUILTINSXP";
88-
case CHARSXP: return "CHARSXP";
89-
case LGLSXP: return "LGLSXP";
90-
case INTSXP: return "INTSXP";
91-
case REALSXP: return "REALSXP";
92-
case CPLXSXP: return "CPLXSXP";
93-
case STRSXP: return "STRSXP";
94-
case DOTSXP: return "DOTSXP";
95-
case ANYSXP: return "ANYSXP";
96-
case VECSXP: return "VECSXP";
97-
case EXPRSXP: return "EXPRSXP";
98-
case BCODESXP: return "BCODESXP";
99-
case EXTPTRSXP: return "EXTPTRSXP";
100-
case WEAKREFSXP: return "WEAKREFSXP";
101-
case S4SXP: return "S4SXP";
78+
case NILSXP: return "NILSXP";
79+
case SYMSXP: return "SYMSXP";
80+
case RAWSXP: return "RAWSXP";
81+
case LISTSXP: return "LISTSXP";
82+
case CLOSXP: return "CLOSXP";
83+
case ENVSXP: return "ENVSXP";
84+
case PROMSXP: return "PROMSXP";
85+
case LANGSXP: return "LANGSXP";
86+
case SPECIALSXP: return "SPECIALSXP";
87+
case BUILTINSXP: return "BUILTINSXP";
88+
case CHARSXP: return "CHARSXP";
89+
case LGLSXP: return "LGLSXP";
90+
case INTSXP: return "INTSXP";
91+
case REALSXP: return "REALSXP";
92+
case CPLXSXP: return "CPLXSXP";
93+
case STRSXP: return "STRSXP";
94+
case DOTSXP: return "DOTSXP";
95+
case ANYSXP: return "ANYSXP";
96+
case VECSXP: return "VECSXP";
97+
case EXPRSXP: return "EXPRSXP";
98+
case BCODESXP: return "BCODESXP";
99+
case EXTPTRSXP: return "EXTPTRSXP";
100+
case WEAKREFSXP: return "WEAKREFSXP";
101+
case S4SXP: return "S4SXP";
102102
default:
103103
return "<unknown>";
104104
}
105-
} // #nocov end
105+
} // #nocov end
106106

107107

108108
} // namespace Rcpp
@@ -127,21 +127,21 @@ std::string demangle(const std::string& name) {
127127
}
128128

129129
// [[Rcpp::register]]
130-
const char* short_file_name(const char* file) { // #nocov start
130+
const char* short_file_name(const char* file) { // #nocov start
131131
std::string f(file);
132132
size_t index = f.find("/include/");
133133
if (index != std::string::npos) {
134134
f = f.substr(index + 9);
135135
}
136136
return f.c_str();
137-
} // #nocov end
137+
}
138138

139139
// [[Rcpp::internal]]
140-
SEXP as_character_externalptr(SEXP xp) { // #nocov start
140+
SEXP as_character_externalptr(SEXP xp) {
141141
char buffer[20];
142142
snprintf(buffer, 20, "%p", (void*)EXTPTR_PTR(xp));
143143
return Rcpp::wrap((const char*)buffer);
144-
} // #nocov end
144+
} // #nocov end
145145

146146
// [[Rcpp::internal]]
147147
SEXP rcpp_capabilities() {
@@ -232,29 +232,29 @@ SEXP rcpp_capabilities() {
232232

233233

234234
// [[Rcpp::internal]]
235-
SEXP rcpp_can_use_cxx0x() { // #nocov start
235+
SEXP rcpp_can_use_cxx0x() { // #nocov start
236236
#if defined(HAS_VARIADIC_TEMPLATES) || defined(RCPP_USING_CXX11)
237237
return Rf_ScalarLogical(TRUE);
238238
#else
239239
return Rf_ScalarLogical(FALSE);
240240
#endif
241-
} // #nocov end
241+
}
242242

243243

244244
// [[Rcpp::internal]]
245-
SEXP rcpp_can_use_cxx11() { // #nocov start
245+
SEXP rcpp_can_use_cxx11() {
246246
#if defined(RCPP_USING_CXX11)
247247
return Rf_ScalarLogical(TRUE);
248248
#else
249249
return Rf_ScalarLogical(FALSE);
250250
#endif
251-
} // #nocov end
251+
}
252252

253253

254254
// [[Rcpp::register]]
255255
SEXP stack_trace(const char* file, int line) {
256256
return R_NilValue;
257-
}
257+
} // #nocov end
258258

259259

260260
// // [ [ Rcpp::register ] ]

0 commit comments

Comments
 (0)