]> gitweb.factorcode.org Git - factor.git/blob - extra/lint/lint-tests.factor
Initial import
[factor.git] / extra / lint / lint-tests.factor
1 USING: io lint kernel math tools.test ;
2 IN: temporary
3
4 ! Don't write code like this
5 : lint1
6     [ "hi" print ] [ ] if ; ! when
7
8 [ { [ [ ] if ] } ] [ \ lint1 lint ] unit-test
9
10 : lint2
11     1 + ; ! 1+
12 [ { [ 1 + ] } ] [ \ lint2 lint ] unit-test
13
14 : lint3
15     dup -rot ; ! tuck
16
17 [ { [ dup -rot ] } ] [ \ lint3 lint ] unit-test
18