summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarshall Clow <mclow.lists@gmail.com>2014-07-09 21:04:22 +0000
committerMarshall Clow <mclow.lists@gmail.com>2014-07-09 21:04:22 +0000
commit79d4ffbc8fb57a6362da83868952fbe3cb591260 (patch)
tree312ef24e38a35785c56134f128a6cc51ee49a620
parent532d8a709b3a277b4added17fc9a2b25068f4998 (diff)
downloadbcm5719-llvm-79d4ffbc8fb57a6362da83868952fbe3cb591260.tar.gz
bcm5719-llvm-79d4ffbc8fb57a6362da83868952fbe3cb591260.zip
Add a reset method to the counting predicates in the test suite
llvm-svn: 212651
-rw-r--r--libcxx/test/support/counting_predicates.hpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/libcxx/test/support/counting_predicates.hpp b/libcxx/test/support/counting_predicates.hpp
index eef7daf310d..4e0f8fb7133 100644
--- a/libcxx/test/support/counting_predicates.hpp
+++ b/libcxx/test/support/counting_predicates.hpp
@@ -22,6 +22,7 @@ public:
bool operator () (const argument_type &a) const { ++count_; return p_(a); }
size_t count() const { return count_; }
+ void reset() { count_ = 0; }
private:
Predicate p_;
@@ -38,7 +39,8 @@ public:
bool operator () (const Arg1 &a1, const Arg2 &a2) const { ++count_; return p_(a1, a2); }
size_t count() const { return count_; }
-
+ void reset() { count_ = 0; }
+
private:
Predicate p_;
mutable size_t count_;
OpenPOWER on IntegriCloud