diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2014-05-14 12:07:05 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2014-05-14 12:07:05 (GMT) |
commit | cc580e3c27c45f56193e3add35a8cc00dcd19b31 (patch) | |
tree | 19d4457365ff7c3a9bc0b161d528fee993fffef4 /test | |
parent | e437da537c85d82e26665837ee7e66a35080eb1e (diff) | |
download | uscxml-cc580e3c27c45f56193e3add35a8cc00dcd19b31.zip uscxml-cc580e3c27c45f56193e3add35a8cc00dcd19b31.tar.gz uscxml-cc580e3c27c45f56193e3add35a8cc00dcd19b31.tar.bz2 |
Fixed some bugs with java bindings
Diffstat (limited to 'test')
-rw-r--r-- | test/CMakeLists.txt | 14 | ||||
-rw-r--r-- | test/src/test-arabica-namespaces.cpp | 6 | ||||
-rw-r--r-- | test/src/test-stress.cpp | 8 |
3 files changed, 18 insertions, 10 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 24d05ab..18dfc03 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -78,14 +78,14 @@ if (NOT WIN32) add_test(test-arabica-xpath ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test-arabica-parsing) set_target_properties(test-arabica-parsing PROPERTIES FOLDER "Tests") - # add_executable(test-stress src/test-stress.cpp) - # if (BUILD_AS_PLUGINS) - # target_link_libraries(test-stress uscxml invoker_dirmon) - # else() - # target_link_libraries(test-stress uscxml) - # endif() + add_executable(test-stress src/test-stress.cpp) + if (BUILD_AS_PLUGINS) + target_link_libraries(test-stress uscxml invoker_dirmon) + else() + target_link_libraries(test-stress uscxml) + endif() # add_test(test-stress ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test-stress ${CMAKE_SOURCE_DIR}/test/w3c) - # set_target_properties(test-stress PROPERTIES FOLDER "Tests") + set_target_properties(test-stress PROPERTIES FOLDER "Tests") # if (LIBPURPLE_FOUND) # add_executable(test-instant-messaging src/test-instant-messaging.cpp) diff --git a/test/src/test-arabica-namespaces.cpp b/test/src/test-arabica-namespaces.cpp index baebeee..ae529c9 100644 --- a/test/src/test-arabica-namespaces.cpp +++ b/test/src/test-arabica-namespaces.cpp @@ -93,7 +93,7 @@ static void validateRootFoo(std::pair<Document<std::string>, NameSpaceInfo>& par Document<std::string> document = parsed.first; Node<std::string> root = document.getDocumentElement(); - _xpath.setNamespaceContext(*nsInfo.nsContext); + _xpath.setNamespaceContext(*nsInfo.getNSContext()); assert(TAGNAME(root) == nsInfo.xmlNSPrefix + "root"); assert(LOCALNAME(root) == "root"); @@ -117,7 +117,7 @@ static void validateRootFooBar(std::pair<Document<std::string>, NameSpaceInfo>& Document<std::string> document = parsed.first; Node<std::string> root = document.getDocumentElement(); - _xpath.setNamespaceContext(*nsInfo.nsContext); + _xpath.setNamespaceContext(*nsInfo.getNSContext()); NodeSet<std::string> barsFiltered = Interpreter::filterChildElements(nsInfo.xmlNSPrefix + "bar", root); assert(barsFiltered.size() == 3); @@ -139,7 +139,7 @@ static void validateRootFooBarBaz(std::pair<Document<std::string>, NameSpaceInfo Document<std::string> document = parsed.first; Node<std::string> root = document.getDocumentElement(); - _xpath.setNamespaceContext(*nsInfo.nsContext); + _xpath.setNamespaceContext(*nsInfo.getNSContext()); assert(TAGNAME(root) == nsInfo.xmlNSPrefix + "root"); assert(LOCALNAME(root) == "root"); diff --git a/test/src/test-stress.cpp b/test/src/test-stress.cpp index 996e0ee..fd36b0a 100644 --- a/test/src/test-stress.cpp +++ b/test/src/test-stress.cpp @@ -144,6 +144,13 @@ int main(int argc, char** argv) { } } +#if 1 + while(true) { + Interpreter interpreter = Interpreter::fromURI("/Users/sradomski/Documents/TK/Code/uscxml/test/w3c/ecma/test235.scxml"); + interpreter.interpret(); + } +#else + DirectoryWatch* watcher = new DirectoryWatch(argv[optind], true); watcher->updateEntries(true); std::map<std::string, struct stat> entries = watcher->getAllEntries(); @@ -180,5 +187,6 @@ int main(int argc, char** argv) { } delete watcher; +#endif return EXIT_SUCCESS; }
\ No newline at end of file |