summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorStefan Radomski <github@mintwerk.de>2017-02-03 15:30:56 (GMT)
committerStefan Radomski <github@mintwerk.de>2017-02-03 15:30:56 (GMT)
commitf7670b8d975d2d686095e98e7e7cc781b69dad0c (patch)
tree9df4dd3e721fbd26a4db14e5d3bc94cf88b8acf5 /test
parent074e8a7db78bba7bdc184f6d18d16c2ab8045fed (diff)
downloaduscxml-f7670b8d975d2d686095e98e7e7cc781b69dad0c.zip
uscxml-f7670b8d975d2d686095e98e7e7cc781b69dad0c.tar.gz
uscxml-f7670b8d975d2d686095e98e7e7cc781b69dad0c.tar.bz2
Reduced dependencies to compile test-gen-c to smaller executable
Diffstat (limited to 'test')
-rw-r--r--test/CMakeLists.txt29
-rw-r--r--test/src/test-gen-c.cpp16
-rw-r--r--test/src/test-validating.cpp1
3 files changed, 40 insertions, 6 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 2b90b97..5cb9a01 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -83,9 +83,34 @@ add_executable(test-state-pass src/test-state-pass.cpp ${GETOPT_FILES})
target_link_libraries(test-state-pass uscxml)
set_target_properties(test-state-pass PROPERTIES FOLDER "Tests")
-add_executable(test-gen-c src/test-gen-c.cpp ${GETOPT_FILES})
-target_link_libraries(test-gen-c uscxml)
+add_executable(test-gen-c
+ src/test-gen-c.cpp
+ ${PROJECT_SOURCE_DIR}/src/uscxml/interpreter/BasicDelayedEventQueue.cpp
+ ${PROJECT_SOURCE_DIR}/src/uscxml/interpreter/BasicEventQueue.cpp
+ ${PROJECT_SOURCE_DIR}/src/uscxml/interpreter/EventQueue.cpp
+ ${PROJECT_SOURCE_DIR}/src/uscxml/interpreter/Logging.cpp
+ ${PROJECT_SOURCE_DIR}/src/uscxml/interpreter/StdOutLogger.cpp
+ ${PROJECT_SOURCE_DIR}/src/uscxml/util/UUID.cpp
+ # ${PROJECT_SOURCE_DIR}/src/uscxml/util/URL.cpp
+ ${PROJECT_SOURCE_DIR}/src/uscxml/util/Convenience.cpp
+ ${PROJECT_SOURCE_DIR}/src/uscxml/util/Base64.c
+ ${PROJECT_SOURCE_DIR}/src/uscxml/util/MD5.c
+ ${PROJECT_SOURCE_DIR}/src/uscxml/util/SHA1.c
+ ${PROJECT_SOURCE_DIR}/src/uscxml/messages/Data.cpp
+ ${PROJECT_SOURCE_DIR}/src/uscxml/messages/Event.cpp
+ ${PROJECT_SOURCE_DIR}/src/uscxml/messages/Blob.cpp
+ ${PROJECT_SOURCE_DIR}/src/uscxml/plugins/Factory.cpp
+ ${PROJECT_SOURCE_DIR}/src/uscxml/plugins/DataModel.cpp
+ ${PROJECT_SOURCE_DIR}/src/uscxml/plugins/Invoker.cpp
+ ${PROJECT_SOURCE_DIR}/src/uscxml/plugins/IOProcessor.cpp
+ ${PROJECT_SOURCE_DIR}/src/uscxml/plugins/datamodel/null/NullDataModel.cpp
+# ${PROJECT_SOURCE_DIR}/src/uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.cpp
+ ${PROJECT_SOURCE_DIR}/contrib/src/jsmn/jsmn.c
+ ${PROJECT_SOURCE_DIR}/contrib/src/evws/evws.c
+ ${GETOPT_FILES})
+target_link_libraries(test-gen-c ${LIBEVENT_LIBRARIES})
set_target_properties(test-gen-c PROPERTIES FOLDER "Tests")
+set_target_properties(test-gen-c PROPERTIES COMPILE_DEFINITIONS "NO_XERCESC;FEATS_ON_CMD")
# issues
file(GLOB_RECURSE USCXML_ISSUES
diff --git a/test/src/test-gen-c.cpp b/test/src/test-gen-c.cpp
index c75492a..0b03129 100644
--- a/test/src/test-gen-c.cpp
+++ b/test/src/test-gen-c.cpp
@@ -23,7 +23,7 @@
//#include "/Users/sradomski/Documents/TK/Code/uscxml/build/cli/test/gen/c/ecma/test446.scxml.machine.c"
#endif
-#include "uscxml/util/URL.h"
+//#include "uscxml/util/URL.h"
//#include "uscxml/concurrency/Timer.h"
//#include "uscxml/dom/DOMUtils.h"
#include "uscxml/plugins/Factory.h"
@@ -44,6 +44,12 @@
using namespace uscxml;
+namespace XERCESC_NS {
+class DOMDocument;
+class DOMNode;
+}
+
+
class StateMachine : public DataModelCallbacks, public IOProcessorCallbacks, public DelayedEventQueueCallbacks {
public:
StateMachine(const uscxml_machine* machine) : machine(machine), parentMachine(NULL), topMostMachine(NULL), invocation(NULL) {
@@ -105,7 +111,7 @@ public:
}
XERCESC_NS::DOMDocument* getDocument() const {
- return document;
+ return NULL;
}
const std::map<std::string, Invoker>& getInvokers() {
return invokers;
@@ -675,6 +681,7 @@ public:
if (data->content) {
content << data->content;
} else {
+#if 0
URL sourceURL(data->src);
if (USER_DATA(ctx)->baseURL.size() > 0) {
sourceURL = URL::resolve(sourceURL, USER_DATA(ctx)->baseURL);
@@ -682,6 +689,7 @@ public:
sourceURL = URL::resolveWithCWD(sourceURL);
}
content << sourceURL.getInContent();
+#endif
}
/**
* first attempt to parse as structured data, we will try
@@ -947,8 +955,8 @@ protected:
size_t currIteration;
};
- X xmlPrefix;
- XERCESC_NS::DOMDocument* document;
+// X xmlPrefix;
+// 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-validating.cpp b/test/src/test-validating.cpp
index 528812b..e69c07d 100644
--- a/test/src/test-validating.cpp
+++ b/test/src/test-validating.cpp
@@ -2,6 +2,7 @@
#include "uscxml/Interpreter.h"
#include "uscxml/interpreter/InterpreterImpl.h"
#include "uscxml/debug/InterpreterIssue.h"
+#include "uscxml/util/DOM.h"
#include "uscxml/interpreter/Logging.h"
#include <xercesc/util/PlatformUtils.hpp>
#include <iostream>