diff --git a/extra/advice/advice-tests.factor b/extra/advice/advice-tests.factor index 0d71ef2220..868f81cbe8 100644 --- a/extra/advice/advice-tests.factor +++ b/extra/advice/advice-tests.factor @@ -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 \ No newline at end of file