summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/CMakeLists.txt7
-rw-r--r--test/ctest/scripts/run_header_compiles.cmake10
-rw-r--r--test/src/test-gen-c.cpp8
-rw-r--r--test/src/test-lifecycle.cpp26
-rw-r--r--test/src/test-state-pass.cpp11
-rw-r--r--test/src/test-url.cpp2
-rw-r--r--test/src/test-validating.cpp4
7 files changed, 38 insertions, 30 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 7343809..4905fbc 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -53,12 +53,17 @@ foreach(USCXML_ISSUE ${USCXML_ISSUES} )
endforeach()
# make sure all headers are self-reliant
+set (USCXML_PUBLIC_HEADERS
+ "${PROJECT_SOURCE_DIR}/src/uscxml/uscxml.h"
+ "${PROJECT_SOURCE_DIR}/src/uscxml/Interpreter.h"
+)
+
file(GLOB_RECURSE USCXML_HEADERS
../src/*.h
../src/*.hpp
)
-foreach(USCXML_HEADER ${USCXML_HEADERS} )
+foreach(USCXML_HEADER ${USCXML_PUBLIC_HEADERS} )
STRING(REGEX REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/../src/" "" USCXML_REL_HEADER ${USCXML_HEADER})
set(HEADER_TEST)
diff --git a/test/ctest/scripts/run_header_compiles.cmake b/test/ctest/scripts/run_header_compiles.cmake
index e60ef0e..8bed4e1 100644
--- a/test/ctest/scripts/run_header_compiles.cmake
+++ b/test/ctest/scripts/run_header_compiles.cmake
@@ -3,11 +3,11 @@ get_filename_component(TEST_FILE_NAME ${TESTFILE} NAME)
set(COMPILE_CMD_BIN
"-c"
-"-I${PROJECT_SOURCE_DIR}/contrib/src"
-"-I${PROJECT_BINARY_DIR}/deps/xerces-c/include"
-"-I${PROJECT_BINARY_DIR}/deps/libevent/include"
-"-I${PROJECT_BINARY_DIR}/deps/uriparser/include"
-"-I${PROJECT_SOURCE_DIR}/contrib/src/evws"
+# "-I${PROJECT_SOURCE_DIR}/contrib/src"
+# "-I${PROJECT_BINARY_DIR}/deps/xerces-c/include"
+# "-I${PROJECT_BINARY_DIR}/deps/libevent/include"
+# "-I${PROJECT_BINARY_DIR}/deps/uriparser/include"
+# "-I${PROJECT_SOURCE_DIR}/contrib/src/evws"
"-I${CMAKE_BINARY_DIR}"
"-I${PROJECT_BINARY_DIR}"
"-I${PROJECT_SOURCE_DIR}/src"
diff --git a/test/src/test-gen-c.cpp b/test/src/test-gen-c.cpp
index 327858c..7870578 100644
--- a/test/src/test-gen-c.cpp
+++ b/test/src/test-gen-c.cpp
@@ -28,7 +28,7 @@
#include "uscxml/util/UUID.h"
#include "uscxml/interpreter/InterpreterImpl.h"
-#include "uscxml/interpreter/EventQueueImpl.h"
+#include "uscxml/interpreter/BasicEventQueue.h"
#ifdef BUILD_PROFILING
# include "uscxml/plugins/DataModel.h"
@@ -77,7 +77,7 @@ public:
return false;
}
- xercesc::DOMDocument* getDocument() const {
+ XERCESC_NS::DOMDocument* getDocument() const {
return document;
}
const std::map<std::string, Invoker>& getInvokers() {
@@ -113,7 +113,7 @@ public:
name = machine->name;
- delayQueue = DelayedEventQueue(std::shared_ptr<DelayedEventQueueImpl>(new DelayedEventQueueImpl(this)));
+ delayQueue = DelayedEventQueue(std::shared_ptr<DelayedEventQueueImpl>(new BasicDelayedEventQueue(this)));
dataModel = Factory::getInstance()->createDataModel(machine->datamodel, this);
if (invocation != NULL) {
@@ -899,7 +899,7 @@ protected:
X xmlPrefix;
std::map<std::string, IOProcessor> ioProcs;
std::map<std::string, Invoker> invokers;
- xercesc::DOMDocument* document;
+ XERCESC_NS::DOMDocument* document;
DelayedEventQueue delayQueue;
std::map<std::string, std::tuple<std::string, std::string, std::string> > sendUUIDs;
diff --git a/test/src/test-lifecycle.cpp b/test/src/test-lifecycle.cpp
index 528d903..df77e96 100644
--- a/test/src/test-lifecycle.cpp
+++ b/test/src/test-lifecycle.cpp
@@ -14,7 +14,7 @@ int startedAt;
int lastTransitionAt;
using namespace uscxml;
-using namespace xercesc;
+using namespace XERCESC_NS;
enum CallbackType {
USCXML_BEFOREPROCESSINGEVENT,
@@ -55,45 +55,45 @@ class SequenceCheckingMonitor : public InterpreterMonitor {
CHECK_CALLBACK_TYPE(USCXML_BEFOREMICROSTEP);
}
- virtual void beforeExitingState(const xercesc::DOMElement* state) {
+ virtual void beforeExitingState(const XERCESC_NS::DOMElement* state) {
CHECK_CALLBACK_TYPE(USCXML_BEFOREEXITINGSTATE);
}
- virtual void afterExitingState(const xercesc::DOMElement* state) {
+ virtual void afterExitingState(const XERCESC_NS::DOMElement* state) {
CHECK_CALLBACK_TYPE(USCXML_AFTEREXITINGSTATE);
}
- virtual void beforeExecutingContent(const xercesc::DOMElement* element) {
+ virtual void beforeExecutingContent(const XERCESC_NS::DOMElement* element) {
CHECK_CALLBACK_TYPE(USCXML_BEFOREEXECUTINGCONTENT);
}
- virtual void afterExecutingContent(const xercesc::DOMElement* element) {
+ virtual void afterExecutingContent(const XERCESC_NS::DOMElement* element) {
CHECK_CALLBACK_TYPE(USCXML_AFTEREXECUTINGCONTENT);
}
- virtual void beforeUninvoking(const xercesc::DOMElement* invokeElem, const std::string& invokeid) {
+ virtual void beforeUninvoking(const XERCESC_NS::DOMElement* invokeElem, const std::string& invokeid) {
CHECK_CALLBACK_TYPE(USCXML_BEFOREUNINVOKING);
}
- virtual void afterUninvoking(const xercesc::DOMElement* invokeElem, const std::string& invokeid) {
+ virtual void afterUninvoking(const XERCESC_NS::DOMElement* invokeElem, const std::string& invokeid) {
CHECK_CALLBACK_TYPE(USCXML_AFTERUNINVOKING);
}
- virtual void beforeTakingTransition(const xercesc::DOMElement* transition) {
+ virtual void beforeTakingTransition(const XERCESC_NS::DOMElement* transition) {
CHECK_CALLBACK_TYPE(USCXML_BEFORETAKINGTRANSITION);
}
- virtual void afterTakingTransition(const xercesc::DOMElement* transition) {
+ virtual void afterTakingTransition(const XERCESC_NS::DOMElement* transition) {
CHECK_CALLBACK_TYPE(USCXML_AFTERTAKINGTRANSITION);
}
- virtual void beforeEnteringState(const xercesc::DOMElement* state) {
+ virtual void beforeEnteringState(const XERCESC_NS::DOMElement* state) {
CHECK_CALLBACK_TYPE(USCXML_BEFOREENTERINGSTATE);
}
- virtual void afterEnteringState(const xercesc::DOMElement* state) {
+ virtual void afterEnteringState(const XERCESC_NS::DOMElement* state) {
CHECK_CALLBACK_TYPE(USCXML_AFTERENTERINGSTATE);
}
- virtual void beforeInvoking(const xercesc::DOMElement* invokeElem, const std::string& invokeid) {
+ virtual void beforeInvoking(const XERCESC_NS::DOMElement* invokeElem, const std::string& invokeid) {
CHECK_CALLBACK_TYPE(USCXML_BEFOREINVOKING);
}
- virtual void afterInvoking(const xercesc::DOMElement* invokeElem, const std::string& invokeid) {
+ virtual void afterInvoking(const XERCESC_NS::DOMElement* invokeElem, const std::string& invokeid) {
CHECK_CALLBACK_TYPE(USCXML_AFTERINVOKING);
}
diff --git a/test/src/test-state-pass.cpp b/test/src/test-state-pass.cpp
index 943b3dc..ac52a0b 100644
--- a/test/src/test-state-pass.cpp
+++ b/test/src/test-state-pass.cpp
@@ -7,6 +7,7 @@
#include <xercesc/util/PlatformUtils.hpp>
#include "uscxml/Interpreter.h"
+#include "uscxml/interpreter/InterpreterMonitor.h"
#include "uscxml/util/DOM.h"
#include "uscxml/util/String.h"
#include "uscxml/util/UUID.h"
@@ -34,7 +35,7 @@
#endif
using namespace std;
-using namespace xercesc;
+using namespace XERCESC_NS;
using namespace uscxml;
@@ -67,11 +68,11 @@ int main(int argc, char** argv) {
try {
Interpreter interpreter = Interpreter::fromURL(documentURI);
- ActionLanguage al;
- al.execContent = std::shared_ptr<ContentExecutorImpl>(new BasicContentExecutorImpl(interpreter.getImpl().get()));
- interpreter.setActionLanguage(al);
+// ActionLanguage al;
+// al.execContent = std::shared_ptr<ContentExecutorImpl>(new ContentExecutorBasic(interpreter.getImpl().get()));
+// interpreter.setActionLanguage(al);
- StateTransitionMonitor mon(interpreter);
+ StateTransitionMonitor mon;
interpreter.setMonitor(&mon);
InterpreterState state = InterpreterState::USCXML_UNDEF;
diff --git a/test/src/test-url.cpp b/test/src/test-url.cpp
index d713c67..aa559f3 100644
--- a/test/src/test-url.cpp
+++ b/test/src/test-url.cpp
@@ -10,7 +10,7 @@
#include <iostream>
using namespace uscxml;
-using namespace xercesc;
+using namespace XERCESC_NS;
class TestServlet : public HTTPServlet {
public:
diff --git a/test/src/test-validating.cpp b/test/src/test-validating.cpp
index a7a89df..34d8122 100644
--- a/test/src/test-validating.cpp
+++ b/test/src/test-validating.cpp
@@ -1,5 +1,7 @@
#include "uscxml/config.h"
#include "uscxml/Interpreter.h"
+#include "uscxml/interpreter/InterpreterImpl.h"
+#include "uscxml/debug/InterpreterIssue.h"
#include <easylogging++.h>
#include <xercesc/util/PlatformUtils.hpp>
@@ -36,7 +38,7 @@ public:
int main(int argc, char** argv) {
- using namespace xercesc;
+ using namespace XERCESC_NS;
int iterations = 1;