]> gitweb.factorcode.org Git - factor.git/blob - extra/models/history/history-tests.factor
more test IN: cleanup.
[factor.git] / extra / models / history / history-tests.factor
1 USING: arrays generic kernel math models namespaces sequences assocs
2 tools.test models.history accessors ;
3
4 f <history> "history" set
5
6 "history" get add-history
7
8 { t } [ "history" get back>> empty? ] unit-test
9 { t } [ "history" get forward>> empty? ] unit-test
10
11 "history" get add-history
12 3 "history" get set-model
13
14 { t } [ "history" get back>> empty? ] unit-test
15 { t } [ "history" get forward>> empty? ] unit-test
16
17 "history" get add-history
18 4 "history" get set-model
19
20 { f } [ "history" get back>> empty? ] unit-test
21 { t } [ "history" get forward>> empty? ] unit-test
22
23 "history" get go-back
24
25 { 3 } [ "history" get value>> ] unit-test
26
27 { t } [ "history" get back>> empty? ] unit-test
28 { f } [ "history" get forward>> empty? ] unit-test
29
30 "history" get go-forward
31
32 { 4 } [ "history" get value>> ] unit-test
33
34 { f } [ "history" get back>> empty? ] unit-test
35 { t } [ "history" get forward>> empty? ] unit-test