]> gitweb.factorcode.org Git - factor.git/blob - extra/morse/morse-tests.factor
Merge branch 'master' of git://factorcode.org/git/factor
[factor.git] / extra / morse / morse-tests.factor
1 ! Copyright (C) 2007 Alex Chapman
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: arrays morse strings tools.test ;
4
5 [ "" ] [ CHAR: \\ ch>morse ] unit-test
6 [ "..." ] [ CHAR: s ch>morse ] unit-test
7 [ CHAR: s ] [ "..." morse>ch ] unit-test
8 [ f ] [ "..--..--.." morse>ch ] unit-test
9 [ "-- --- .-. ... . / -.-. --- -.. ." ] [ "morse code" >morse ] unit-test
10 [ "morse code" ] [ "-- --- .-. ... . / -.-. --- -.. ." morse> ] unit-test
11 [ "hello, world!" ] [ "Hello, World!" >morse morse> ] unit-test
12 [ ] [ "sos" 0.075 play-as-morse ] unit-test
13 [ ] [ "Factor rocks!" play-as-morse ] unit-test