factor/extra/lint/lint-tests.factor

19 lines
323 B
Factor
Raw Normal View History

2007-09-20 18:09:08 -04:00
USING: io lint kernel math tools.test ;
2008-03-01 17:00:45 -05:00
IN: lint.tests
2007-09-20 18:09:08 -04:00
! Don't write code like this
: lint1
[ "hi" print ] [ ] if ; ! when
[ { [ [ ] if ] } ] [ \ lint1 lint ] unit-test
: lint2
1 + ; ! 1+
[ { [ 1 + ] } ] [ \ lint2 lint ] unit-test
: lint3
dup -rot ; ! tuck
[ { [ dup -rot ] } ] [ \ lint3 lint ] unit-test