2017-03-02 16:36:23 -05:00
|
|
|
---
|
|
|
|
Test
|
|
|
|
---
|
|
|
|
Shows object composition, a default method, and two different ways of referencing objects.
|
|
|
|
|
2017-03-03 15:06:49 -05:00
|
|
|
| script | lisp interpreter fixture |
|
|
|
|
| check | evaluate | (load "lisp/fruit-counter.lisp") | T |
|
|
|
|
| check | evaluate | (my-fruits :inc-apples) | 1 |
|
|
|
|
| check | evaluate | (my-fruits :inc-apples) | 2 |
|
|
|
|
| check | evaluate | (funcall my-fruits2 :dec-bananas) | 9999 |
|
|
|
|
| check | evaluate | (my-fruits :set-coconuts 12) | 12 |
|
|
|
|
| check | evaluate | (my-fruits) | ((APPLES 2) (BANANAS 0) (COCONUTS 12)) |
|
|
|
|
| check | evaluate | (funcall my-fruits2) | ((APPLES 10000) (BANANAS 9999) (COCONUTS 10000)) |
|