transcendental-lisp/fitnesse/FitNesseRoot/LispInterpreter/StaticVariable.wiki
Mike Cifelli 77a341a1a7 Add more advanced lisp objects
Added a class to compute compound interest.

An alias for FUNCALL has been added: CALL

Refactored some acceptance tests to load code from files.
2017-03-06 16:52:06 -05:00

21 lines
988 B
Plaintext

---
Test
---
Shows the usage of a static variable.
''"Let Over Lambda Over Let Over Lambda"''
| script | lisp interpreter fixture |
| show | evaluate text | (load "lisp/object/static.lisp") |
| show | evaluate text | (setq my-counter (counter-class)) |
| check | evaluate text | (funcall my-counter) | 1 |
| check | evaluate text | (funcall my-counter) | 2 |
| check | evaluate text | (funcall my-counter) | 3 |
| show | evaluate text | (toggle-counter-direction) |
| check | evaluate text | (funcall my-counter) | 2 |
| check | evaluate text | (funcall my-counter) | 1 |
| check | evaluate text | (funcall my-counter) | 0 |
| show | evaluate text | (toggle-counter-direction) |
| check | evaluate text | (funcall my-counter) | 1 |
| check | evaluate text | (funcall my-counter) | 2 |
| check | evaluate text | (funcall my-counter) | 3 |