transcendental-lisp/fitnesse/FitNesseRoot/TranscendentalLisp/MultipleMethodObject.wiki
2017-03-07 10:20:22 -05:00

15 lines
692 B
Plaintext

---
Test
---
An object with multiple methods.
| script | lisp interpreter fixture |
| show | evaluate text | (load "lisp/object/multiple-methods.lisp") |
| show | evaluate text | (setq my-counter (counter-class)) |
| check | evaluate text | (funcall my-counter :inc) | 1 |
| check | evaluate text | (funcall my-counter :inc) | 2 |
| check | evaluate text | (funcall my-counter :inc) | 3 |
| check | evaluate text | (funcall my-counter :dec) | 2 |
| check | evaluate text | (funcall my-counter :dec) | 1 |
| check | evaluate text | (funcall my-counter :dec) | 0 |