excluded-sem9-jscheme_behavior.story 799 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. Some basic mathematical operations
  2. Narrative:
  3. We need to check that our interpreter performs the
  4. same operations as jscheme (at least on classical
  5. lisp/scheme operations). It may differ on some
  6. specific but documented cases.
  7. Scenario: built-in operators
  8. Given jscheme and a lisp interpreter
  9. When the expression evaluated is <expression>
  10. Then the results should be identical
  11. Examples:
  12. |expression|
  13. |(+ 1 1) |
  14. |(+ 1 1 1) |
  15. |(+ 1 1 1 2) |
  16. |(- 1 3) |
  17. |(* 1 3) |
  18. |(* 1 3 5) |
  19. |(* 1 3 5 7) |
  20. |(/ 3 2) |
  21. |(max 2 3) |
  22. Scenario: cons
  23. Given jscheme and a lisp interpreter
  24. When the expression evaluated is <expression>
  25. Then the results should be identical
  26. Examples:
  27. |expression|
  28. |(cons 1 2) |
  29. |(cons 1 ()) |
  30. |(cons () 1) |
  31. |(cons () ()) |
  32. |(cons (cons 1 2) 3) |
  33. |(cons 1 (cons 2 ())) |