Skip to content

Commit d34c550

Browse files
committed
revert some test changes
1 parent 8e9a431 commit d34c550

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

inst/tests/cpp/sum.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,16 @@ struct Sum : public Worker
2121

2222
// constructors
2323
Sum(const NumericVector input) : input(input), value(0) {}
24-
Sum(const Sum& sum, Split) : input(sum.input), value(0) {
25-
printf("ctor: invoking split constructor\n");
26-
}
24+
Sum(const Sum& sum, Split) : input(sum.input), value(0) {}
2725

2826
// accumulate just the element of the range I have been asked to
2927
void operator()(std::size_t begin, std::size_t end) {
30-
double extra = std::accumulate(input.begin() + begin, input.begin() + end, 0.0);
31-
value += extra;
32-
printf("work: added %f (value is now %f)\n", extra, value);
28+
value += std::accumulate(input.begin() + begin, input.begin() + end, 0.0);
3329
}
3430

3531
// join my value with that of another Sum
3632
void join(const Sum& rhs) {
3733
value += rhs.value;
38-
printf("join: added %f (value is now %f)\n", rhs.value, value);
3934
}
4035
};
4136

0 commit comments

Comments
 (0)