projects
/
anna.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Improved wait for regexp operations
[anna.git]
/
source
/
testing
/
TestStep.cpp
diff --git
a/source/testing/TestStep.cpp
b/source/testing/TestStep.cpp
index
7e96926
..
e180437
100644
(file)
--- a/
source/testing/TestStep.cpp
+++ b/
source/testing/TestStep.cpp
@@
-559,10
+559,14
@@
void TestStepWait::setCondition(bool fromEntity,
a_condition.setServiceContextId(serviceContextId);
}
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.setReceivedFromEntity(fromEntity);
- a_condition.setRegexp(regexp);
+ a_condition.setRegexp
Xml
(regexp);
}
anna::xml::Node* TestStepWait::asXML(anna::xml::Node* parent)
}
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 = "<empty>";
}
else {
}
else {
- xmlmsg = "<unable to decode, check traces>";
+ if (decodeMessage()) {
+ xmlmsg = "\n";
+ xmlmsg += a_messageCodec->asXMLString();
+ xmlmsg += "\n";
+ }
+ else {
+ xmlmsg = "<unable to decode, check traces>";
+ }
}
if (msg != "") result->createAttribute("MatchedMessage", msg);
}
if (msg != "") result->createAttribute("MatchedMessage", msg);