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

http://github.com/abeaumont/factor · Factor · 10 lines · 7 code · 3 blank · 0 comment · 0 complexity · a4255b435ec1fb64650a984141e2b959 MD5 · raw file

  1. USING: math strings sequences tools.test ;
  2. IN: multi-methods.tests
  3. GENERIC: legacy-test ( a -- b )
  4. M: integer legacy-test sq ;
  5. M: string legacy-test " hey" append ;
  6. [ 25 ] [ 5 legacy-test ] unit-test
  7. [ "hello hey" ] [ "hello" legacy-test ] unit-test