Commit e12a932e authored by Michal 'vorner' Vaner's avatar Michal 'vorner' Vaner
Browse files

[trac981] Rename LogicCheck to LogicOperator

Just for consistency with LogicOperator
parent ea2a4f90
......@@ -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))));
}
/**
......
......@@ -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);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment