From: Michal 'vorner' Vaner Date: Thu, 7 Jul 2011 09:54:56 +0000 (+0200) Subject: [trac981] Rename LogicCheck to LogicOperator X-Git-Tag: perftcpdns_before_epoll~263^2~1^2~1^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e12a932eadf0b33e26979cfbf387eb6788b97cad;p=thirdparty%2Fkea.git [trac981] Rename LogicCheck to LogicOperator Just for consistency with LogicOperator --- diff --git a/src/lib/acl/logic_check.h b/src/lib/acl/logic_check.h index fe16f7f9be..92441e8969 100644 --- a/src/lib/acl/logic_check.h +++ b/src/lib/acl/logic_check.h @@ -206,14 +206,14 @@ private: * This simply returns the negation of whatever returns the subexpression. */ template -class NotCheck : public CompoundCheck { +class NotOperator : public CompoundCheck { public: /** * \brief Constructor * * \param expr The subexpression to be negated by this NOT. */ - NotCheck(const boost::shared_ptr >& expr) : + NotOperator(const boost::shared_ptr >& expr) : expr_(expr) { } /** @@ -265,7 +265,7 @@ public: const Loader& loader) { - return (boost::shared_ptr >(new NotCheck( + return (boost::shared_ptr >(new NotOperator( loader.loadCheck(definition)))); } /** diff --git a/src/lib/acl/tests/logic_check_test.cc b/src/lib/acl/tests/logic_check_test.cc index 1d1979a612..1c80277a2b 100644 --- a/src/lib/acl/tests/logic_check_test.cc +++ b/src/lib/acl/tests/logic_check_test.cc @@ -244,7 +244,7 @@ TEST_F(LogicCreatorTest, nested) { } void notTest(bool value) { - NotCheck notOp(shared_ptr >(new ConstCheck(value, 0))); + NotOperator notOp(shared_ptr >(new ConstCheck(value, 0))); Log log; // It returns negated value EXPECT_EQ(!value, notOp.matches(log)); @@ -281,9 +281,9 @@ TEST_F(LogicCreatorTest, notInvalid) { } TEST_F(LogicCreatorTest, notValid) { - shared_ptr > notOp(load >("{\"NOT\":" - " {\"logcheck\":" - " [0, true]}}")); + shared_ptr > notOp(load >("{\"NOT\":" + " {\"logcheck\":" + " [0, true]}}")); EXPECT_FALSE(notOp->matches(log_)); log_.checkFirst(1); }