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