Sha256: 3fdfb1380af01e2ac2752fdf2f8bd74db2baf060c1861906648c19d704f4aca4
Contents?: true
Size: 606 Bytes
Versions: 2
Compression:
Stored size: 606 Bytes
Contents
#ifndef BANDIT_BETRUTHY_H #define BANDIT_BETRUTHY_H #include "Matcher.h" namespace bandit { namespace Matchers { class BeTruthy : public Matcher { public: BeTruthy() : Matcher() {} template<typename U> bool matches(const U& actualValue) const { return !!actualValue; } bool matches(const std::nullptr_t&) const { return false; } protected: virtual std::string failure_message_end() const { return std::string("evaluate to true"); } }; static const BeTruthy be_truthy = BeTruthy(); }} #endif // BANDIT_BETRUTHY_H
Version data entries
2 entries across 2 versions & 1 rubygems