| 79 | } |
| 80 | |
| 81 | struct FunctionObj { |
| 82 | FunctionObj(int data_, bool fail_) : data(data_), fail(fail_) { } |
| 83 | SEXP operator() () { |
| 84 | NumericVector x = maybeThrow(&fail); |
| 85 | x[0] = x[0] * data; |
| 86 | return x; |
| 87 | } |
| 88 | int data; |
| 89 | bool fail; |
| 90 | }; |
| 91 | |
| 92 | // [[Rcpp::export]] |
| 93 | SEXP testUnwindProtectFunctionObject(Environment indicator, bool fail) { |
no outgoing calls
no test coverage detected