const std::string name_;
};
+template<typename Context>
+class NotCheck : public CompoundCheck<Context> {
+public:
+ NotCheck(const boost::shared_ptr<Check<Context> >& expr) {
+
+ }
+ virtual typename CompoundCheck<Context>::Checks getSubexpressions() const {
+
+ }
+ virtual bool matches(const Context& context) const {
+ }
+private:
+ const boost::shared_ptr<Check<Context> > expr_;
+};
+
}
}
log_.checkFirst(2);
}
+void notTest(bool value) {
+ NotCheck<Log> notOp(shared_ptr<Check<Log> >(new ConstCheck(value, 0)));
+ Log log;
+ // It returns negated value
+ EXPECT_EQ(!value, notOp.matches(log));
+ // And runs the only one thing there
+ log.checkFirst(1);
+ // Check the getSubexpressions does sane things
+ ASSERT_EQ(1, notOp.getSubexpressions().size());
+ EXPECT_EQ(value, notOp.getSubexpressions()[0]->matches(log));
+}
+
+TEST(Not, trueValue) {
+ notTest(true);
+}
+
+TEST(Not, trueValue) {
+ notTest(true);
+}
+
}