transcendental-lisp/fitnesse/FitNesseRoot/LispInterpreter/ObjectComposition.wiki

14 lines
787 B
Plaintext

---
Test
---
Shows object composition, a default method, and two different ways of referencing objects.
| script | lisp interpreter fixture |
| show | evaluate | (load "lisp/dlambda.lisp") |
| show | evaluate | (load "lisp/fruit-counter.lisp") |
| check | evaluate | (my-counter :inc-apples) | 1 |
| check | evaluate | (my-counter :inc-apples) | 2 |
| check | evaluate | (funcall my-counter2 :dec-bananas) | 9999 |
| check | evaluate | (my-counter :set-coconuts 12) | 12 |
| check | evaluate | (my-counter) |(APPLES 2 BANANAS 0 COCONUTS 12) |
| check | evaluate | (funcall my-counter2) |(APPLES 10000 BANANAS 9999 COCONUTS 10000) |