Browse Source

[trac981] Rename LogicCheck to LogicOperator

Just for consistency with LogicOperator
Michal 'vorner' Vaner 14 years ago
parent
commit
e12a932ead
2 changed files with 7 additions and 7 deletions
  1. 3 3
      src/lib/acl/logic_check.h
  2. 4 4
      src/lib/acl/tests/logic_check_test.cc

+ 3 - 3
src/lib/acl/logic_check.h

@@ -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))));
     }
     /**

+ 4 - 4
src/lib/acl/tests/logic_check_test.cc

@@ -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);
 }