Merge branch 'emacs' of http://git.hacks-galore.org/jao/factor
[factor/jcg.git] / unmaintained / triggers / triggers-tests.factor
blob744a4b13a77ece29d616827ce3b413245a366db7
1 USING: triggers kernel tools.test ;
2 IN: triggers.tests
4 SYMBOL: test-trigger
5 test-trigger reset-trigger
6 : add-test-trigger test-trigger add-trigger ;
7 [ ] [ test-trigger call-trigger ] unit-test
8 [ "op called" ] [ "op" [ "op called" ] add-test-trigger test-trigger call-trigger ] unit-test
9 [ "first called" "second called" ] [
10     test-trigger reset-trigger
11     "second op" [ "second called" ] add-test-trigger
12     "first op" [ "first called" ] add-test-trigger
13     test-trigger call-trigger
14 ] unit-test