factor/basis/models/history/history-tests.factor

38 lines
965 B
Factor
Raw Normal View History

2008-07-04 18:58:37 -04:00
USING: arrays generic kernel math models namespaces sequences assocs
2008-09-02 02:53:43 -04:00
tools.test models.history accessors ;
IN: models.history.tests
2008-07-04 18:58:37 -04:00
f <history> "history" set
"history" get add-history
2008-09-02 02:53:43 -04:00
[ t ] [ "history" get back>> empty? ] unit-test
[ t ] [ "history" get forward>> empty? ] unit-test
2008-07-04 18:58:37 -04:00
"history" get add-history
3 "history" get set-model
2008-09-02 02:53:43 -04:00
[ t ] [ "history" get back>> empty? ] unit-test
[ t ] [ "history" get forward>> empty? ] unit-test
2008-07-04 18:58:37 -04:00
"history" get add-history
4 "history" get set-model
2008-09-02 02:53:43 -04:00
[ f ] [ "history" get back>> empty? ] unit-test
[ t ] [ "history" get forward>> empty? ] unit-test
2008-07-04 18:58:37 -04:00
"history" get go-back
2008-09-02 02:53:43 -04:00
[ 3 ] [ "history" get value>> ] unit-test
2008-07-04 18:58:37 -04:00
2008-09-02 02:53:43 -04:00
[ t ] [ "history" get back>> empty? ] unit-test
[ f ] [ "history" get forward>> empty? ] unit-test
2008-07-04 18:58:37 -04:00
"history" get go-forward
2008-09-02 02:53:43 -04:00
[ 4 ] [ "history" get value>> ] unit-test
2008-07-04 18:58:37 -04:00
2008-09-02 02:53:43 -04:00
[ f ] [ "history" get back>> empty? ] unit-test
[ t ] [ "history" get forward>> empty? ] unit-test
2008-07-04 18:58:37 -04:00