factor/extra/logic/examples/hanoi/hanoi-tests.factor

21 lines
620 B
Factor
Raw Normal View History

2020-03-01 04:19:07 -05:00
! Copyright (C) 2019-2020 KUSUMOTO Norio.
! See http://factorcode.org/license.txt for BSD license.
2020-03-03 07:04:46 -05:00
USING: tools.test logic logic.examples.hanoi
2020-03-01 04:19:07 -05:00
formatting sequences ;
2020-03-03 07:04:46 -05:00
IN: logic.examples.hanoi.tests
2020-03-01 04:19:07 -05:00
{ t } [
{
"The following statements will be printed:"
"move disk from left to center"
"move disk from left to right"
"move disk from center to right"
"move disk from left to center"
"move disk from right to left"
"move disk from right to center"
"move disk from left to center"
" "
} [ "%s\n" printf ] each
{ hanoi 3 } query
] unit-test