summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/src/test-lifecycle.cpp36
-rw-r--r--test/src/test-serialization.cpp5
-rw-r--r--test/src/test-stress.cpp2
-rw-r--r--test/src/test-validating.cpp2
4 files changed, 23 insertions, 22 deletions
diff --git a/test/src/test-lifecycle.cpp b/test/src/test-lifecycle.cpp
index e948e3c..6b30c96 100644
--- a/test/src/test-lifecycle.cpp
+++ b/test/src/test-lifecycle.cpp
@@ -48,67 +48,67 @@ std::list<CallbackType> callBackSeq;
class SequenceCheckingMonitor : public InterpreterMonitor {
- virtual void beforeProcessingEvent(Interpreter& interpreter, const Event& event) {
+ virtual void beforeProcessingEvent(const std::string& sessionId, const Event& event) {
CHECK_CALLBACK_TYPE(USCXML_BEFOREPROCESSINGEVENT);
}
- virtual void beforeMicroStep(Interpreter& interpreter) {
+ virtual void beforeMicroStep(const std::string& sessionId) {
CHECK_CALLBACK_TYPE(USCXML_BEFOREMICROSTEP);
}
- virtual void beforeExitingState(Interpreter& interpreter, const XERCESC_NS::DOMElement* state) {
+ virtual void beforeExitingState(const std::string& sessionId, const std::string& stateName, const XERCESC_NS::DOMElement* state) {
CHECK_CALLBACK_TYPE(USCXML_BEFOREEXITINGSTATE);
}
- virtual void afterExitingState(Interpreter& interpreter, const XERCESC_NS::DOMElement* state) {
+ virtual void afterExitingState(const std::string& sessionId, const std::string& stateName, const XERCESC_NS::DOMElement* state) {
CHECK_CALLBACK_TYPE(USCXML_AFTEREXITINGSTATE);
}
- virtual void beforeExecutingContent(Interpreter& interpreter, const XERCESC_NS::DOMElement* element) {
+ virtual void beforeExecutingContent(const std::string& sessionId, const XERCESC_NS::DOMElement* element) {
CHECK_CALLBACK_TYPE(USCXML_BEFOREEXECUTINGCONTENT);
}
- virtual void afterExecutingContent(Interpreter& interpreter, const XERCESC_NS::DOMElement* element) {
+ virtual void afterExecutingContent(const std::string& sessionId, const XERCESC_NS::DOMElement* element) {
CHECK_CALLBACK_TYPE(USCXML_AFTEREXECUTINGCONTENT);
}
- virtual void beforeUninvoking(Interpreter& interpreter, const XERCESC_NS::DOMElement* invokeElem, const std::string& invokeid) {
+ virtual void beforeUninvoking(const std::string& sessionId, const XERCESC_NS::DOMElement* invokeElem, const std::string& invokeid) {
CHECK_CALLBACK_TYPE(USCXML_BEFOREUNINVOKING);
}
- virtual void afterUninvoking(Interpreter& interpreter, const XERCESC_NS::DOMElement* invokeElem, const std::string& invokeid) {
+ virtual void afterUninvoking(const std::string& sessionId, const XERCESC_NS::DOMElement* invokeElem, const std::string& invokeid) {
CHECK_CALLBACK_TYPE(USCXML_AFTERUNINVOKING);
}
- virtual void beforeTakingTransition(Interpreter& interpreter, const XERCESC_NS::DOMElement* transition) {
+ virtual void beforeTakingTransition(const std::string& sessionId, const XERCESC_NS::DOMElement* transition) {
CHECK_CALLBACK_TYPE(USCXML_BEFORETAKINGTRANSITION);
}
- virtual void afterTakingTransition(Interpreter& interpreter, const XERCESC_NS::DOMElement* transition) {
+ virtual void afterTakingTransition(const std::string& sessionId, const XERCESC_NS::DOMElement* transition) {
CHECK_CALLBACK_TYPE(USCXML_AFTERTAKINGTRANSITION);
}
- virtual void beforeEnteringState(Interpreter& interpreter, const XERCESC_NS::DOMElement* state) {
+ virtual void beforeEnteringState(const std::string& sessionId, const std::string& stateName, const XERCESC_NS::DOMElement* state) {
CHECK_CALLBACK_TYPE(USCXML_BEFOREENTERINGSTATE);
}
- virtual void afterEnteringState(Interpreter& interpreter, const XERCESC_NS::DOMElement* state) {
+ virtual void afterEnteringState(const std::string& sessionId, const std::string& stateName, const XERCESC_NS::DOMElement* state) {
CHECK_CALLBACK_TYPE(USCXML_AFTERENTERINGSTATE);
}
- virtual void beforeInvoking(Interpreter& interpreter, const XERCESC_NS::DOMElement* invokeElem, const std::string& invokeid) {
+ virtual void beforeInvoking(const std::string& sessionId, const XERCESC_NS::DOMElement* invokeElem, const std::string& invokeid) {
CHECK_CALLBACK_TYPE(USCXML_BEFOREINVOKING);
}
- virtual void afterInvoking(Interpreter& interpreter, const XERCESC_NS::DOMElement* invokeElem, const std::string& invokeid) {
+ virtual void afterInvoking(const std::string& sessionId, const XERCESC_NS::DOMElement* invokeElem, const std::string& invokeid) {
CHECK_CALLBACK_TYPE(USCXML_AFTERINVOKING);
}
- virtual void afterMicroStep(Interpreter& interpreter) {
+ virtual void afterMicroStep(const std::string& sessionId) {
CHECK_CALLBACK_TYPE(USCXML_AFTERMICROSTEP);
}
- virtual void onStableConfiguration(Interpreter& interpreter) {
+ virtual void onStableConfiguration(const std::string& sessionId) {
CHECK_CALLBACK_TYPE(USCXML_ONSTABLECONFIGURATION);
}
- virtual void beforeCompletion(Interpreter& interpreter) {
+ virtual void beforeCompletion(const std::string& sessionId) {
CHECK_CALLBACK_TYPE(USCXML_BEFORECOMPLETION);
}
- virtual void afterCompletion(Interpreter& interpreter) {
+ virtual void afterCompletion(const std::string& sessionId) {
CHECK_CALLBACK_TYPE(USCXML_AFTERCOMPLETION);
}
diff --git a/test/src/test-serialization.cpp b/test/src/test-serialization.cpp
index 968bae3..da8df89 100644
--- a/test/src/test-serialization.cpp
+++ b/test/src/test-serialization.cpp
@@ -21,7 +21,7 @@ int lastTransitionAt;
//class StatusMonitor : public uscxml::InterpreterMonitor {
class StatusMonitor : public uscxml::StateTransitionMonitor {
- void beforeTakingTransition(uscxml::Interpreter& interpreter, const XERCESC_NS::DOMElement* transition) {
+ void beforeTakingTransition(const std::string& sessionId, const XERCESC_NS::DOMElement* transition) {
lastTransitionAt = time(NULL);
}
@@ -65,6 +65,7 @@ int main(int argc, char** argv) {
}
DirectoryWatch* watcher = new DirectoryWatch(argv[optind], true);
+ watcher->setLogger(Logger::getDefault());
watcher->updateEntries(true);
std::map<std::string, struct stat> entries = watcher->getAllEntries();
@@ -92,7 +93,7 @@ int main(int argc, char** argv) {
lastTransitionAt = time(NULL);
std::string sourceXML = std::string(argv[optind]) + PATH_SEPERATOR + entryIter->first;
- sourceXML = "/Users/sradomski/Documents/TK/Code/uscxml/test/w3c/ecma/test557.scxml";
+// sourceXML = "/Users/sradomski/Documents/TK/Code/uscxml/test/w3c/ecma/test557.scxml";
Interpreter interpreter = Interpreter::fromURL(sourceXML);
LOGD(USCXML_INFO) << "Processing " << interpreter.getImpl()->getBaseURL() << std::endl;
diff --git a/test/src/test-stress.cpp b/test/src/test-stress.cpp
index 4d395ab..e034e87 100644
--- a/test/src/test-stress.cpp
+++ b/test/src/test-stress.cpp
@@ -19,7 +19,7 @@ int startedAt;
int lastTransitionAt;
class StatusMonitor : public uscxml::InterpreterMonitor {
- void beforeTakingTransition(uscxml::Interpreter& interpreter, const XERCESC_NS::DOMElement* transition) {
+ void beforeTakingTransition(const std::string& sessionId, const XERCESC_NS::DOMElement* transition) {
lastTransitionAt = time(NULL);
}
diff --git a/test/src/test-validating.cpp b/test/src/test-validating.cpp
index ae2a2f5..a0fd6dd 100644
--- a/test/src/test-validating.cpp
+++ b/test/src/test-validating.cpp
@@ -35,7 +35,7 @@ public:
IssueMonitor() {
runtimeIssues = 0;
}
- void reportIssue(Interpreter& intrpreter, const InterpreterIssue& issue) {
+ void reportIssue(const std::string& sessionId, const InterpreterIssue& issue) {
runtimeIssues++;
}
};