Adding tests for advice

db4
James Cash 2008-11-05 23:49:57 -05:00
parent 2904f35f12
commit 585afbf24e
1 changed files with 18 additions and 1 deletions

View File

@ -1,5 +1,22 @@
! Copyright (C) 2008 James Cash
! See http://factorcode.org/license.txt for BSD license.
USING: kernel sequences tools.tests advice ;
USING: kernel sequences tools.test advice parser ;
IN: advice.tests
[
: foo "foo" ;
\ foo make-advised
{ "bar" "foo" } [
[ "bar" ] "barify" \ foo advise-before
foo ] unit-test
{ "bar" "foo" "baz" } [
[ "baz" ] "bazify" \ foo advise-after
foo ] unit-test
{ "foo" "baz" } [
"barify" \ foo before remove-advice
foo ] unit-test
] with-interactive-vocabs