]> gitweb.factorcode.org Git - factor.git/blob - basis/ui/tools/browser/history/history-tests.factor
factor: second stab at [ ] [ ] unit-test -> { } [ ] unit-test
[factor.git] / basis / ui / tools / browser / history / history-tests.factor
1 USING: namespaces ui.tools.browser.history sequences tools.test
2 accessors kernel ;
3 IN: ui.tools.browser.history.tests
4
5 TUPLE: dummy obj ;
6
7 M: dummy history-value obj>> ;
8 M: dummy set-history-value obj<< ;
9
10 dummy new <history> "history" set
11
12 "history" get add-history
13
14 { t } [ "history" get back>> empty? ] unit-test
15 { t } [ "history" get forward>> empty? ] unit-test
16
17 "history" get add-history
18 3 "history" get owner>> set-history-value
19
20 { t } [ "history" get back>> empty? ] unit-test
21 { t } [ "history" get forward>> empty? ] unit-test
22
23 "history" get add-history
24 4 "history" get owner>> set-history-value
25
26 { f } [ "history" get back>> empty? ] unit-test
27 { t } [ "history" get forward>> empty? ] unit-test
28
29 "history" get go-back
30
31 { 3 } [ "history" get owner>> history-value ] unit-test
32
33 { t } [ "history" get back>> empty? ] unit-test
34 { f } [ "history" get forward>> empty? ] unit-test
35
36 "history" get go-forward
37
38 { 4 } [ "history" get owner>> history-value ] unit-test
39
40 { f } [ "history" get back>> empty? ] unit-test
41 { t } [ "history" get forward>> empty? ] unit-test