1 USING: kernel test sequences sequences-internals circular ;
3 [ 0 ] [ { 0 1 2 3 4 } <circular> 0 swap circular@ drop ] unit-test
4 [ 2 ] [ { 0 1 2 3 4 } <circular> 2 swap circular@ drop ] unit-test
6 [ CHAR: t ] [ "test" <circular> 0 swap nth ] unit-test
7 [ "test" ] [ "test" <circular> "" like ] unit-test
9 [ "test" <circular> 5 swap nth ] unit-test-fails
10 [ CHAR: e ] [ "test" <circular> 5 swap nth-unsafe ] unit-test
12 [ [ 1 2 3 ] ] [ { 1 2 3 } <circular> [ ] like ] unit-test
13 [ [ 2 3 1 ] ] [ { 1 2 3 } <circular> 1 over change-circular-start [ ] like ] unit-test
14 [ [ 3 1 2 ] ] [ { 1 2 3 } <circular> 1 over change-circular-start 1 over change-circular-start [ ] like ] unit-test
16 [ "fob" ] [ "foo" <circular> CHAR: b 2 pick set-nth "" like ] unit-test
17 [ "foo" <circular> CHAR: b 3 rot set-nth ] unit-test-fails
18 [ "boo" ] [ "foo" <circular> CHAR: b 3 pick set-nth-unsafe "" like ] unit-test
19 [ "ornact" ] [ "factor" <circular> 4 over change-circular-start CHAR: n 2 pick set-nth "" like ] unit-test