Add failing tests

db4
Slava Pestov 2008-10-31 21:07:57 -05:00
parent 804c6f93ea
commit 7fc44aa444
1 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,14 @@
USING: math tools.test ;
IN: classes.predicate
PREDICATE: negative < integer 0 < ;
PREDICATE: positive < integer 0 > ;
GENERIC: abs ( n -- n )
M: integer abs ;
M: negative abs -1 * ;
M: positive abs ;
[ 10 ] [ -10 abs ] unit-test
[ 10 ] [ 10 abs ] unit-test
[ 0 ] [ 0 abs ] unit-test