X-Git-Url: https://git.teslayout.com/public/public/public/?p=anna.git;a=blobdiff_plain;f=source%2Ftesting%2FTestStep.cpp;h=e1804371dd184db18094071ec7d56e7c93fb74d4;hp=7e9692639fd7a5bbfc197aab8eef4ef0c0cc3ec3;hb=9fa68da11c56250017da9735e4a5dd3fd3b2021b;hpb=d30d9e082885e16f0098a699a3b79f53fb28910b diff --git a/source/testing/TestStep.cpp b/source/testing/TestStep.cpp index 7e96926..e180437 100644 --- a/source/testing/TestStep.cpp +++ b/source/testing/TestStep.cpp @@ -559,10 +559,14 @@ void TestStepWait::setCondition(bool fromEntity, a_condition.setServiceContextId(serviceContextId); } -void TestStepWait::setCondition(bool fromEntity, const std::string ®exp) throw() { +void TestStepWait::setConditionRegexpHex(bool fromEntity, const std::string ®exp) throw() { + a_condition.setReceivedFromEntity(fromEntity); + a_condition.setRegexpHex(regexp); +} +void TestStepWait::setConditionRegexpXml(bool fromEntity, const std::string ®exp) throw() { a_condition.setReceivedFromEntity(fromEntity); - a_condition.setRegexp(regexp); + a_condition.setRegexpXml(regexp); } anna::xml::Node* TestStepWait::asXML(anna::xml::Node* parent) @@ -584,13 +588,18 @@ throw() { } } - if (decodeMessage()) { - xmlmsg = "\n"; - xmlmsg += a_messageCodec->asXMLString(); - xmlmsg += "\n"; + if (a_message.isEmpty()) { + xmlmsg = ""; } else { - xmlmsg = ""; + if (decodeMessage()) { + xmlmsg = "\n"; + xmlmsg += a_messageCodec->asXMLString(); + xmlmsg += "\n"; + } + else { + xmlmsg = ""; + } } if (msg != "") result->createAttribute("MatchedMessage", msg);