! Copyright (C) 2007 Alex Chapman
-! See http://factorcode.org/license.txt for BSD license.
+! See https://factorcode.org/license.txt for BSD license.
USING: arrays morse strings tools.test ;
-IN: morse.tests
-[ "?" ] [ CHAR: \\ ch>morse ] unit-test
-[ "..." ] [ CHAR: s ch>morse ] unit-test
-[ CHAR: s ] [ "..." morse>ch ] unit-test
-[ CHAR: \s ] [ "..--..--.." morse>ch ] unit-test
-[ "-- --- .-. ... . / -.-. --- -.. ." ] [ "morse code" >morse ] unit-test
-[ "morse code" ] [ "-- --- .-. ... . / -.-. --- -.. ." morse> ] unit-test
-[ "hello, world!" ] [ "Hello, World!" >morse morse> ] unit-test
-[ ".- -... -.-." ] [ "abc" >morse ] unit-test
+{ "?" } [ CHAR: \\ ch>morse ] unit-test
+{ "..." } [ CHAR: s ch>morse ] unit-test
+{ CHAR: s } [ "..." morse>ch ] unit-test
+{ CHAR: \s } [ "..--..--.." morse>ch ] unit-test
+{ "-- --- .-. ... . / -.-. --- -.. ." } [ "morse code" >morse ] unit-test
+{ "morse code" } [ "-- --- .-. ... . / -.-. --- -.. ." morse> ] unit-test
+{ "hello, world!" } [ "Hello, World!" >morse morse> ] unit-test
+{ ".- -... -.-." } [ "abc" >morse ] unit-test
-[ "abc" ] [ ".- -... -.-." morse> ] unit-test
+{ "abc" } [ ".- -... -.-." morse> ] unit-test
-[ "morse code" ] [
+{ "morse code" } [
[MORSE
-- --- .-. ... . /
-.-. --- -.. .
MORSE] >morse morse> ] unit-test
-[ "morse code 123" ] [
+{ "morse code 123" } [
[MORSE
- __ ___ ._. ... . /
- _._. ___ _.. . /
+ __ ___ ._. ... . /
+ _._. ___ _.. . /
.____ ..___ ...__
MORSE] ] unit-test
-[ [MORSE
+{ [MORSE
-- --- .-. ... . /
-.-. --- -.. .
- MORSE] ] [
- "morse code" >morse morse>
+ MORSE] } [
+ "morse code" >morse morse>
] unit-test
-[ "factor rocks!" ] [
+{ "factor rocks!" } [
[MORSE
- ..-. .- -.-. - --- .-. /
+ ..-. .- -.-. - --- .-. /
.-. --- -.-. -.- ... -.-.--
MORSE] ] unit-test
! [ ] [ "sos" 0.075 play-as-morse* ] unit-test