diff options
Diffstat (limited to 'vendor/bandit/bandit/assertion_frameworks/matchers/ValueProxy.h')
-rw-r--r-- | vendor/bandit/bandit/assertion_frameworks/matchers/ValueProxy.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/vendor/bandit/bandit/assertion_frameworks/matchers/ValueProxy.h b/vendor/bandit/bandit/assertion_frameworks/matchers/ValueProxy.h new file mode 100644 index 00000000..0cd5d35c --- /dev/null +++ b/vendor/bandit/bandit/assertion_frameworks/matchers/ValueProxy.h @@ -0,0 +1,26 @@ +#ifndef BANDIT_VALUEPROXY_H +#define BANDIT_VALUEPROXY_H + +#include "MatchProxy.h" + +namespace bandit { namespace Matchers { + + template<typename T> + class ValueProxy + { + public: + MatchProxy<T> to; + MatchProxy<T> to_not; + + explicit ValueProxy(const char* filename, int lineNumber, const T& value) : to(*this), to_not(*this, true), _value(value), _filename(filename), _lineNumber(lineNumber) {} + + private: + friend class MatchProxy<T>; + + const T& _value; + std::string _filename; + int _lineNumber; + }; +}} + +#endif // BANDIT_VALUEPROXY_H |