]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[trac981] Rename LogicCheck to LogicOperator
authorMichal 'vorner' Vaner <michal.vaner@nic.cz>
Thu, 7 Jul 2011 09:54:56 +0000 (11:54 +0200)
committerMichal 'vorner' Vaner <michal.vaner@nic.cz>
Thu, 7 Jul 2011 09:54:56 +0000 (11:54 +0200)
Just for consistency with LogicOperator

src/lib/acl/logic_check.h
src/lib/acl/tests/logic_check_test.cc

index fe16f7f9be4277ea8a1cad162b2b7148c07455aa..92441e8969c092435a04549fd573bfbea3615b4b 100644 (file)
@@ -206,14 +206,14 @@ private:
  * This simply returns the negation of whatever returns the subexpression.
  */
 template<typename Context>
-class NotCheck : public CompoundCheck<Context> {
+class NotOperator : public CompoundCheck<Context> {
 public:
     /**
      * \brief Constructor
      *
      * \param expr The subexpression to be negated by this NOT.
      */
-    NotCheck(const boost::shared_ptr<Check<Context> >& expr) :
+    NotOperator(const boost::shared_ptr<Check<Context> >& expr) :
         expr_(expr)
     { }
     /**
@@ -265,7 +265,7 @@ public:
                                                       const Loader<Context,
                                                       Action>& loader)
     {
-        return (boost::shared_ptr<Check<Context> >(new NotCheck<Context>(
+        return (boost::shared_ptr<Check<Context> >(new NotOperator<Context>(
                     loader.loadCheck(definition))));
     }
     /**
index 1d1979a612a25e8f9bd942620687c4357c3d7528..1c80277a2b15c15e673f004a2fdad228936f7115 100644 (file)
@@ -244,7 +244,7 @@ TEST_F(LogicCreatorTest, nested) {
 }
 
 void notTest(bool value) {
-    NotCheck<Log> notOp(shared_ptr<Check<Log> >(new ConstCheck(value, 0)));
+    NotOperator<Log> notOp(shared_ptr<Check<Log> >(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<NotCheck<Log> > notOp(load<NotCheck<Log> >("{\"NOT\":"
-                                                          "  {\"logcheck\":"
-                                                          "     [0, true]}}"));
+    shared_ptr<NotOperator<Log> > notOp(load<NotOperator<Log> >("{\"NOT\":"
+                                                                "  {\"logcheck\":"
+                                                                "     [0, true]}}"));
     EXPECT_FALSE(notOp->matches(log_));
     log_.checkFirst(1);
 }