Remove warnings
[anna.git] / source / testing / TestStep.cpp
index 7e96926..413ad28 100644 (file)
@@ -101,6 +101,7 @@ namespace {
     // TODO: mutex the step while setting data here !!
   }
 
+/*
   void cmdRunOnThreadWithFork (TestStepCmd *step, const std::string &cmd) {
 
     // Thread running:
@@ -148,6 +149,7 @@ namespace {
       step->complete();
     }
   }
+*/
 
   bool decodeMessage(const anna::DataBlock &message, anna::diameter::codec::Message &messageCodec) throw() {
 
@@ -559,10 +561,14 @@ void TestStepWait::setCondition(bool fromEntity,
   a_condition.setServiceContextId(serviceContextId);
 }
 
-void TestStepWait::setCondition(bool fromEntity, const std::string &regexp) throw() {
+void TestStepWait::setConditionRegexpHex(bool fromEntity, const std::string &regexp) throw() {
+  a_condition.setReceivedFromEntity(fromEntity);
+  a_condition.setRegexpHex(regexp);
+}
 
+void TestStepWait::setConditionRegexpXml(bool fromEntity, const std::string &regexp) throw() {
   a_condition.setReceivedFromEntity(fromEntity);
-  a_condition.setRegexp(regexp);
+  a_condition.setRegexpXml(regexp);
 }
 
 anna::xml::Node* TestStepWait::asXML(anna::xml::Node* parent)
@@ -584,13 +590,18 @@ throw() {
     }
   }
 
-  if (decodeMessage()) {
-    xmlmsg = "\n";
-    xmlmsg += a_messageCodec->asXMLString();
-    xmlmsg += "\n";
+  if (a_message.isEmpty()) {
+      xmlmsg = "<empty>";
   }
   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);