diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2014-07-03 21:21:24 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2014-07-03 21:21:24 (GMT) |
commit | 50174e88cd7ccbaa455bc40bd214ae494378a7cc (patch) | |
tree | be0e7707b704757105084141dd6e31109be53719 /test/src/test-lifecycle.cpp | |
parent | 67f8e8b4106eb20ce0bc01fd840b0d8e4319cb36 (diff) | |
download | uscxml-50174e88cd7ccbaa455bc40bd214ae494378a7cc.zip uscxml-50174e88cd7ccbaa455bc40bd214ae494378a7cc.tar.gz uscxml-50174e88cd7ccbaa455bc40bd214ae494378a7cc.tar.bz2 |
Removed w3c ecma tests from xpath and vice versa
Diffstat (limited to 'test/src/test-lifecycle.cpp')
-rw-r--r-- | test/src/test-lifecycle.cpp | 102 |
1 files changed, 0 insertions, 102 deletions
diff --git a/test/src/test-lifecycle.cpp b/test/src/test-lifecycle.cpp index 7cbb68b..22c724a 100644 --- a/test/src/test-lifecycle.cpp +++ b/test/src/test-lifecycle.cpp @@ -410,108 +410,6 @@ int main(int argc, char** argv) { assert(interpreter.step() == USCXML_MICROSTEPPED); assert(interpreter.step() == USCXML_FINISHED); } - -#if 0 - - - if (0) { - // macrostep in between - const char* xml = - "<scxml>" - " <state id=\"start\">" - " <onentry>" - " <send event=\"continue\" delay=\"2s\"/>" - " </onentry>" - " <transition target=\"s2\" event=\"continue\" />" - " </state>" - " <state id=\"s2\">" - " <transition target=\"done\" />" - " </state>" - " <final id=\"done\" />" - "</scxml>"; - - Interpreter interpreter = Interpreter::fromXML(xml); - - assert(interpreter.getState() == uscxml::InterpreterState::USCXML_INSTANTIATED); - assert(interpreter.step() == uscxml::InterpreterState::USCXML_IDLE); - assert(interpreter.step(true) == uscxml::InterpreterState::USCXML_MACROSTEPPED); - assert(interpreter.step() == uscxml::InterpreterState::USCXML_MICROSTEPPED); - assert(interpreter.step() == uscxml::InterpreterState::USCXML_FINISHED); - interpreter.reset(); - assert(interpreter.getState() == uscxml::InterpreterState::USCXML_INSTANTIATED); - assert(interpreter.step() == uscxml::InterpreterState::USCXML_IDLE); - assert(interpreter.step(true) == uscxml::InterpreterState::USCXML_MACROSTEPPED); - assert(interpreter.step() == uscxml::InterpreterState::USCXML_MICROSTEPPED); - assert(interpreter.step() == uscxml::InterpreterState::USCXML_FINISHED); - } - - if (1) { - // macrostep in between, external event - const char* xml = - "<scxml>" - " <state id=\"start\">" - " <transition target=\"s2\" event=\"continue\" />" - " </state>" - " <state id=\"s2\">" - " <transition target=\"done\" />" - " </state>" - " <final id=\"done\" />" - "</scxml>"; - - Interpreter interpreter = Interpreter::fromXML(xml); - - assert(interpreter.getState() == uscxml::InterpreterState::USCXML_INSTANTIATED); - assert(interpreter.step() == uscxml::InterpreterState::USCXML_IDLE); - interpreter.receive(Event("continue")); - assert(interpreter.step(true) == uscxml::InterpreterState::USCXML_MACROSTEPPED); - assert(interpreter.step() == uscxml::InterpreterState::USCXML_MICROSTEPPED); - assert(interpreter.step() == uscxml::InterpreterState::USCXML_FINISHED); - interpreter.reset(); - assert(interpreter.getState() == uscxml::InterpreterState::USCXML_INSTANTIATED); - assert(interpreter.step() == uscxml::InterpreterState::USCXML_IDLE); - interpreter.receive(Event("continue")); - assert(interpreter.step(true) == uscxml::InterpreterState::USCXML_MACROSTEPPED); - assert(interpreter.step() == uscxml::InterpreterState::USCXML_MICROSTEPPED); - assert(interpreter.step() == uscxml::InterpreterState::USCXML_FINISHED); - } - - if (1) { - // macrostep in between, external event - const char* xml = - "<scxml>" - " <state id=\"start\">" - " <transition target=\"s2\" event=\"continue\" />" - " </state>" - " <state id=\"s2\">" - " <transition target=\"done\" />" - " </state>" - " <final id=\"done\" />" - "</scxml>"; - - Interpreter interpreter = Interpreter::fromXML(xml); - interpreter.start(); - // assume interpreter is started - assert(interpreter.getState() & InterpreterState::USCXML_THREAD_STARTED); - tthread::this_thread::sleep_for(tthread::chrono::milliseconds(100)); - - // assume it is started and running - std::cout << interpreter.getState() << std::endl; - - assert(interpreter.getState() & InterpreterState::USCXML_THREAD_STARTED); - assert(interpreter.getState() & InterpreterState::USCXML_THREAD_RUNNING); - assert(interpreter.getState() & InterpreterState::USCXML_IDLE); - - interpreter.receive(Event("continue")); - tthread::this_thread::sleep_for(tthread::chrono::milliseconds(200)); - - std::cout << interpreter.getState() << std::endl; - int state = interpreter.getState(); - assert(state & InterpreterState::USCXML_FINISHED); - assert(!(state & InterpreterState::USCXML_THREAD_STARTED)); - assert(!(state & InterpreterState::USCXML_THREAD_RUNNING)); - - } -#endif } return EXIT_SUCCESS; }
\ No newline at end of file |