summaryrefslogtreecommitdiffstats
path: root/test/src
diff options
context:
space:
mode:
authorStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-07-23 09:25:44 (GMT)
committerStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-07-23 09:25:44 (GMT)
commiteb99c62e3d00f4ea5271f6dfc6401e3fcd5a5b90 (patch)
treec57585368b5855b7f71c5383d045d428a249ef8b /test/src
parent122285d16fd8ac9855c92519d48919bea36791b4 (diff)
downloaduscxml-eb99c62e3d00f4ea5271f6dfc6401e3fcd5a5b90.zip
uscxml-eb99c62e3d00f4ea5271f6dfc6401e3fcd5a5b90.tar.gz
uscxml-eb99c62e3d00f4ea5271f6dfc6401e3fcd5a5b90.tar.bz2
Fixed setting intial config
Diffstat (limited to 'test/src')
-rw-r--r--test/src/test-initial-config.cpp36
1 files changed, 36 insertions, 0 deletions
diff --git a/test/src/test-initial-config.cpp b/test/src/test-initial-config.cpp
new file mode 100644
index 0000000..dcba84d
--- /dev/null
+++ b/test/src/test-initial-config.cpp
@@ -0,0 +1,36 @@
+#include "uscxml/Message.h"
+#include "uscxml/Interpreter.h"
+#include <assert.h>
+#include <boost/algorithm/string.hpp>
+#include <iostream>
+
+using namespace uscxml;
+using namespace boost;
+
+
+int main(int argc, char** argv) {
+#ifdef _WIN32
+ WSADATA wsaData;
+ WSAStartup(MAKEWORD(2, 2), &wsaData);
+#endif
+
+ if (argc != 2) {
+ std::cerr << "Expected path to test-initial-config.scxml" << std::endl;
+ exit(EXIT_FAILURE);
+ }
+
+ std::string test = argv[1];
+
+ {
+ Interpreter interpreter = Interpreter::fromURI(test);
+ std::vector<std::string> states;
+ states.push_back("finish_shortcut");
+ states.push_back("ADMINISTRATIVE_NON-HR-MANAGEMENT");
+ states.push_back("HR-MANAGER_MANAGE-HR");
+ states.push_back("SYSTEM_1.1_BEGIN");
+ states.push_back("COORDINATOR_1");
+ interpreter.setConfiguration(states);
+ interpreter.interpret();
+ }
+
+} \ No newline at end of file