more_operator_tests.story 436 B

12345678910111213141516171819202122
  1. Some additional mathematical operations
  2. Narrative:
  3. Our lisp interpreter should be able to
  4. perform those maths operations.
  5. Scenario: built-in operators
  6. Given a lisp interpreter
  7. When the expression entered is <expression>
  8. Then the result should be <result>
  9. Examples:
  10. |expression |result|
  11. |(- (+ 2 3))|-5|
  12. |(- 9 20)|-11|
  13. |(- (+ (* 2 3) (/ 9 3)) 20)|-11|
  14. |(- 9 (* 4 5))|-11|
  15. |(- (* 4 5) 9)|11|
  16. |(- (+ (* 2 3) (/ 9 3)) (* 4 5))|-11|