1 ! Copyback (C) 2008 Daniel Ehrenberg
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: tools.test persistent.deques kernel math ;
4 IN: persistent.deques.tests
7 [ { 1 2 3 } sequence>deque 3 [ pop-back ] times deque-empty? ] unit-test
10 [ { 1 2 3 } sequence>deque 3 [ pop-front ] times deque-empty? ] unit-test
13 [ { 1 2 3 } sequence>deque pop-front 2 [ pop-back ] times deque-empty? ]
17 [ { 1 2 3 4 5 6 } sequence>deque pop-front swap push-back deque>sequence ]
20 [ 1 ] [ { 1 2 3 4 } sequence>deque peek-front ] unit-test
21 [ 4 ] [ { 1 2 3 4 } sequence>deque peek-back ] unit-test
23 [ 1 t ] [ <deque> 1 push-front pop-back deque-empty? ] unit-test
24 [ 1 t ] [ <deque> 1 push-front pop-front deque-empty? ] unit-test
25 [ 1 t ] [ <deque> 1 push-back pop-front deque-empty? ] unit-test
26 [ 1 t ] [ <deque> 1 push-back pop-back deque-empty? ] unit-test
29 [ <deque> 1 push-front 2 push-front pop-back deque-empty? ] unit-test
32 [ <deque> 1 push-back 2 push-back pop-front deque-empty? ] unit-test
35 [ <deque> 1 push-back 2 push-back pop-back deque-empty? ] unit-test
38 [ <deque> 1 push-front 2 push-front pop-front deque-empty? ] unit-test