summaryrefslogtreecommitdiff
path: root/vendor/bandit/bandit/assertion_frameworks/matchers/BeEmpty.h
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/bandit/bandit/assertion_frameworks/matchers/BeEmpty.h')
-rw-r--r--vendor/bandit/bandit/assertion_frameworks/matchers/BeEmpty.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/vendor/bandit/bandit/assertion_frameworks/matchers/BeEmpty.h b/vendor/bandit/bandit/assertion_frameworks/matchers/BeEmpty.h
new file mode 100644
index 00000000..a83ef994
--- /dev/null
+++ b/vendor/bandit/bandit/assertion_frameworks/matchers/BeEmpty.h
@@ -0,0 +1,32 @@
+#ifndef BANDIT_BEEMPTY_H
+#define BANDIT_BEEMPTY_H
+
+#include "Matcher.h"
+
+namespace bandit { namespace Matchers {
+
+ class BeEmpty : public Matcher
+ {
+ private:
+ // BeEmpty & operator=(const BeEmpty &);
+
+ public:
+ explicit BeEmpty() : Matcher() {}
+
+ template<typename U>
+ bool matches(const U& container) const
+ {
+ return container.empty();
+ }
+
+ protected:
+ std::string failure_message_end() const
+ {
+ return std::string("be empty");
+ }
+ };
+
+ static const BeEmpty be_empty = BeEmpty();
+}}
+
+#endif // BANDIT_BEEMPTY_H