diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-08-13 10:07:32 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-08-13 10:07:32 (GMT) |
commit | 459f406eb2a36d393bd3a2b6aa3d63d86eb99c07 (patch) | |
tree | 35593bb978fee75bb7547f3d2c84a9039413fe1f /test/samples | |
parent | beac3e74f703148085947d75da6fdaa9fd7472b4 (diff) | |
download | uscxml-459f406eb2a36d393bd3a2b6aa3d63d86eb99c07.zip uscxml-459f406eb2a36d393bd3a2b6aa3d63d86eb99c07.tar.gz uscxml-459f406eb2a36d393bd3a2b6aa3d63d86eb99c07.tar.bz2 |
Started Java datamodel and fixed memory leaks
Diffstat (limited to 'test/samples')
-rw-r--r-- | test/samples/uscxml/test-communication.scxml | 8 | ||||
-rw-r--r-- | test/samples/uscxml/test-java-invoker.scxml | 9 | ||||
-rw-r--r-- | test/samples/uscxml/test-openal.scxml | 154 | ||||
-rw-r--r-- | test/samples/uscxml/test-simplest.scxml | 3 |
4 files changed, 126 insertions, 48 deletions
diff --git a/test/samples/uscxml/test-communication.scxml b/test/samples/uscxml/test-communication.scxml index 4811a3f..2cba08e 100644 --- a/test/samples/uscxml/test-communication.scxml +++ b/test/samples/uscxml/test-communication.scxml @@ -1,6 +1,7 @@ <scxml datamodel="ecmascript" initial="start" binding="late" name="foo"> - <state id="start"> - + <script src="http://uscxml.tk.informatik.tu-darmstadt.de/scripts/dump.js" /> + + <state id="start"> <!-- Setup datamodel, print environment and send ourself an event to transition to next state --> <datamodel> @@ -24,6 +25,9 @@ This is some content you got there dude! </send> </onentry> <transition event="transitionToNext" target="step1" cond="_event.data.bar == 'this is the bar data'" /> + <transition event="*" target="final"> + <log label="FAIL!" expr="dump(_event)" /> + </transition> </state> <state id="step1"> <onentry> diff --git a/test/samples/uscxml/test-java-invoker.scxml b/test/samples/uscxml/test-java-invoker.scxml index 97d66c8..a226913 100644 --- a/test/samples/uscxml/test-java-invoker.scxml +++ b/test/samples/uscxml/test-java-invoker.scxml @@ -7,16 +7,17 @@ <script>dump(_event);</script> </finalize> <content> - <foo></foo> - </content> - + </content> </invoke> <transition event="*" target="invokeJSON" /> </state> <state id="invokeJSON"> <invoke type="java"> <content> - <foo></foo> + { + "foo": "bar", + "baz": 12 + } </content> <finalize> <script>dump(_event);</script> diff --git a/test/samples/uscxml/test-openal.scxml b/test/samples/uscxml/test-openal.scxml index 9a1dec0..b17e34b 100644 --- a/test/samples/uscxml/test-openal.scxml +++ b/test/samples/uscxml/test-openal.scxml @@ -1,55 +1,125 @@ <scxml datamodel="ecmascript" name="spatial.audio.test"> <script src="http://uscxml.tk.informatik.tu-darmstadt.de/scripts/dump.js" /> <script> - var bubblesDeg = 0; - var electricDeg = 90; + var audioPos = 0; + var audioURL = "http://uscxml.tk.informatik.tu-darmstadt.de/audio"; </script> - <state id="click.continuously"> - <invoke type="openal" id="audio.id1" /> + <state id="audiotests"> + <invoke type="openal" id="audio" /> <state id="ready"> <onentry> - <send event="spatial-audio.play" delay="1ms" /> + <send event="start" delay="10ms" /> <log expr="'Ready'" /> </onentry> - <transition target="play" event="spatial-audio.play" /> - </state> - <parallel id="play"> - <state id="bubbles"> - <onentry> - <send target="#_audio.id1" event="play" id="bubbles"> - <param name="src" expr="'http://www.talkingwav.com/various/applause.wav'" /> - </send> - </onentry> - </state> - <state id="electric"> - <onentry> - <send target="#_audio.id1" event="play" id="electric"> - <param name="src" expr="'http://www.talkingwav.com/various/aaaaagh.wav'" /> + <transition target="wav" event="spatial-audio.play" /> + <parallel id="start"> + <state id="move.audio"> + <send target="#_audio" event="move.source"> </send> - </onentry> - </state> - <state id="rotate"> - <state id="rotateinner"> - <onentry> - <send event="rotate" delay="1000ms" /> - <send target="#_audio.id1" event="move.source"> - <param name="source" expr="'bubbles'" /> - <param name="circle" expr="bubblesDeg + 'deg'" /> - </send> - <send target="#_audio.id1" event="move.source"> - <param name="source" expr="'electric'" /> - <param name="circle" expr="electricDeg + 'deg'" /> - </send> - <script> - bubblesDeg += 10; - electricDeg += 20; - </script> - </onentry> - <transition event="rotate" type="internal" target="rotateinner" /> </state> - </state> - </parallel> + <state id="play.audio"> + <state id="wav"> + <state id="11025-8bit-wav"> + <onentry> + <log expr="'11025-8bit-wav'" /> + <send target="#_audio" event="play" delay="10ms"><param name="src" expr="audioURL + '/wav/11025-8bit-mono.wav'" /></send> + </onentry> + <transition event="audio.end" target="22050-8bit-wav" /> + </state> + <state id="22050-8bit-wav"> + <onentry> + <log expr="'22050-8bit-wav'" /> + <send target="#_audio" event="play"><param name="src" expr="audioURL + '/wav/22050-8bit-mono.wav'" /></send> + </onentry> + <transition event="audio.end" target="44100-8bit-wav" /> + </state> + <state id="44100-8bit-wav"> + <onentry> + <log expr="'44100-8bit-wav'" /> + <send target="#_audio" event="play"><param name="src" expr="audioURL + '/wav/44100-8bit-mono.wav'" /></send> + </onentry> + <transition event="audio.end" target="11025-16bit-wav" /> + </state> + <state id="11025-16bit-wav"> + <onentry> + <log expr="'11025-16bit-wav'" /> + <send target="#_audio" event="play"><param name="src" expr="audioURL + '/wav/11025-16bit-mono.wav'" /></send> + </onentry> + <transition event="audio.end" target="22050-16bit-wav" /> + </state> + <state id="22050-16bit-wav"> + <onentry> + <log expr="'22050-16bit-wav'" /> + <send target="#_audio" event="play"><param name="src" expr="audioURL + '/wav/22050-16bit-mono.wav'" /></send> + </onentry> + <transition event="audio.end" target="44100-16bit-wav" /> + </state> + <state id="44100-16bit-wav"> + <onentry> + <log expr="'44100-16bit-wav'" /> + <send target="#_audio" event="play"><param name="src" expr="audioURL + '/wav/44100-16bit-mono.wav'" /></send> + </onentry> + <transition event="audio.end" target="11025-24bit-wav" /> + </state> + <state id="11025-24bit-wav"> + <onentry> + <log expr="'11025-24bit-wav'" /> + <send target="#_audio" event="play"><param name="src" expr="audioURL + '/wav/11025-24bit-mono.wav'" /></send> + </onentry> + <transition event="audio.end" target="22050-24bit-wav" /> + </state> + <state id="22050-24bit-wav"> + <onentry> + <log expr="'22050-24bit-wav'" /> + <send target="#_audio" event="play"><param name="src" expr="audioURL + '/wav/22050-24bit-mono.wav'" /></send> + </onentry> + <transition event="audio.end" target="44100-24bit-wav" /> + </state> + <state id="44100-24bit-wav"> + <onentry> + <log expr="'44100-24bit-wav'" /> + <send target="#_audio" event="play"><param name="src" expr="audioURL + '/wav/44100-24bit-mono.wav'" /></send> + </onentry> + <transition event="audio.end" target="11025-32bit-wav" /> + </state> + <state id="11025-32bit-wav"> + <onentry> + <log expr="'11025-32bit-wav'" /> + <send target="#_audio" event="play"><param name="src" expr="audioURL + '/wav/11025-32bit-mono.wav'" /></send> + </onentry> + <transition event="audio.end" target="22050-32bit-wav" /> + </state> + <state id="22050-32bit-wav"> + <onentry> + <log expr="'22050-32bit-wav'" /> + <send target="#_audio" event="play"><param name="src" expr="audioURL + '/wav/22050-32bit-mono.wav'" /></send> + </onentry> + <transition event="audio.end" target="44100-32bit-wav" /> + </state> + <state id="44100-32bit-wav"> + <onentry> + <log expr="'44100-32bit-wav'" /> + <send target="#_audio" event="play"><param name="src" expr="audioURL + '/wav/44100-32bit-mono.wav'" /></send> + </onentry> + <transition event="audio.end" target="final" /> + </state> + </state> + <state id="caf"> + </state> + <state id="flac"> + </state> + <state id="mp3"> + </state> + <state id="ogg"> + </state> + <state id="aiff"> + </state> + </state> + </parallel> + </state> + <transition event="error.*" target="final"> + <log expr="dump(_event);" /> + </transition> </state> - <final id="final" /> </scxml>
\ No newline at end of file diff --git a/test/samples/uscxml/test-simplest.scxml b/test/samples/uscxml/test-simplest.scxml new file mode 100644 index 0000000..8e90e38 --- /dev/null +++ b/test/samples/uscxml/test-simplest.scxml @@ -0,0 +1,3 @@ +<scxml> + <final id="foo" /> +</scxml>
\ No newline at end of file |