diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-10-08 00:24:59 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-10-08 00:24:59 (GMT) |
commit | 8daf2ea0a7192e556cc059c2220469ea22155380 (patch) | |
tree | 20494f647dad5dbea56f9c0a5b7241d1e9e3c7f7 /test | |
parent | 3a8a7a56ab604c3cca49792973c8b0c6d8a089b9 (diff) | |
download | uscxml-8daf2ea0a7192e556cc059c2220469ea22155380.zip uscxml-8daf2ea0a7192e556cc059c2220469ea22155380.tar.gz uscxml-8daf2ea0a7192e556cc059c2220469ea22155380.tar.bz2 |
More fixes for MSVC
Diffstat (limited to 'test')
-rw-r--r-- | test/CMakeLists.txt | 13 | ||||
-rw-r--r-- | test/src/test-w3c.cpp | 24 |
2 files changed, 9 insertions, 28 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 51fe962..4fba8a5 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -68,11 +68,12 @@ if (NOT WIN32) add_test(test-stress ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test-stress ${CMAKE_SOURCE_DIR}/test/samples/w3c) set_target_properties(test-stress PROPERTIES FOLDER "Tests") - add_executable(test-instant-messaging src/test-instant-messaging.cpp) - target_link_libraries(test-instant-messaging uscxml) - add_test(test-instant-messaging ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test-instant-messaging) - set_target_properties(test-instant-messaging PROPERTIES FOLDER "Tests") - + if (LIBPURPLE_FOUND) + add_executable(test-instant-messaging src/test-instant-messaging.cpp) + target_link_libraries(test-instant-messaging uscxml) + add_test(test-instant-messaging ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test-instant-messaging) + set_target_properties(test-instant-messaging PROPERTIES FOLDER "Tests") + endif() endif() add_executable(test-url src/test-url.cpp) @@ -113,7 +114,7 @@ set_target_properties(scxml-test-framework-client PROPERTIES FOLDER "Tests") # add_test(test-curl-multi-api ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test-completion) # set_target_properties(test-curl-multi-api PROPERTIES FOLDER "Tests") - add_executable(test-w3c src/test-w3c.cpp ${PROJECT_SOURCE_DIR}/contrib/src/getopt/XGetopt.cpp) + add_executable(test-w3c src/test-w3c.cpp) target_link_libraries(test-w3c uscxml) set_target_properties(test-w3c PROPERTIES FOLDER "Tests") diff --git a/test/src/test-w3c.cpp b/test/src/test-w3c.cpp index e89ab2c..94cafa4 100644 --- a/test/src/test-w3c.cpp +++ b/test/src/test-w3c.cpp @@ -123,32 +123,12 @@ int main(int argc, char** argv) { google::InitGoogleLogging(argv[0]); google::LogToStderr(); -#ifndef _WIN32 - opterr = 0; -#endif - int option; - while ((option = getopt(argc, argv, "vl:p:")) != -1) { - switch(option) { - case 'l': - google::InitGoogleLogging(optarg); - break; - case 'p': - uscxml::Factory::pluginPath = optarg; - break; - case '?': - break; - default: - printUsageAndExit(); - break; - } - } - // for (int i = 0; i < argc; i++) // std::cout << argv[i] << std::endl; // std::cout << optind << std::endl; - LOG(INFO) << "Processing " << argv[optind]; - Interpreter interpreter = Interpreter::fromURI(argv[optind]); + LOG(INFO) << "Processing " << argv[1]; + Interpreter interpreter = Interpreter::fromURI(argv[1]); if (interpreter) { // interpreter.setCmdLineOptions(argc, argv); // interpreter->setCapabilities(Interpreter::CAN_NOTHING); |