PageRenderTime 108ms CodeModel.GetById 100ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/extra/multi-methods/tests/legacy.factor

http://github.com/abeaumont/factor
Unknown | 10 lines | 7 code | 3 blank | 0 comment | 0 complexity | a4255b435ec1fb64650a984141e2b959 MD5 | raw file
 1USING: math strings sequences tools.test ;
 2IN: multi-methods.tests
 3
 4GENERIC: legacy-test ( a -- b )
 5
 6M: integer legacy-test sq ;
 7M: string legacy-test " hey" append ;
 8
 9[ 25 ] [ 5 legacy-test ] unit-test
10[ "hello hey" ] [ "hello" legacy-test ] unit-test