X-Git-Url: https://git.teslayout.com/public/public/public/?p=anna.git;a=blobdiff_plain;f=source%2Ftesting%2FTestCondition.cpp;h=416b893549703085d2c65ae7d2e1a323eb6120a2;hp=6f0bba0d899882916e5bfd1b82ae91abe8ce4b70;hb=415985b3f67878c2e3cee785a0b1cb36f4eff901;hpb=227446df961ead723c8f2b04ea53d99c770a438f diff --git a/source/testing/TestCondition.cpp b/source/testing/TestCondition.cpp index 6f0bba0..416b893 100644 --- a/source/testing/TestCondition.cpp +++ b/source/testing/TestCondition.cpp @@ -45,17 +45,7 @@ bool TestDiameterCondition::comply(const anna::DataBlock &message) const throw() if (a_type == Type::RegexpXml) { anna::diameter::codec::Message codecMsg; try { codecMsg.decode(message); } catch (anna::RuntimeException &ex) { ex.trace(); } - - //return codecMsg.isLike(getRegexp()); - // We will remove LF from both sides to ease regexp management: - std::string regexp = getRegexp(); - regexp.erase(std::remove(regexp.begin(), regexp.end(), '\n'), regexp.end()); - anna::RegularExpression re(regexp); - - std::string msgString = codecMsg.asXMLString(); - msgString.erase(std::remove(msgString.begin(), msgString.end(), '\n'), msgString.end()); - - return re.isLike(msgString); + return codecMsg.isLike(getRegexp()); } else if (a_type == Type::RegexpHex) { anna::RegularExpression re(getRegexp());