1
1
mirror of https://github.com/kanaka/mal.git synced 2024-09-11 13:55:55 +03:00
mal/tests/perf2.mal
Nicolas Boulenguez 83665b4fda lib/: add tests, fix detected problems, improve implementations
equality.mal:
- fix typos
- let and2 and or2 always return booleans
- when looping in sequences, compare lengths only once
- empty? instead of an equality test
- when looping on a keys, do not check if a contains the current key
- change the `cond` logic: when a is a sequence and b a map, return
  false instead of delegating to scalar-equal?.
- add tests

memoize.mal:
- make explicit that the function name must be kept
- fix typo in tests

protocols.mal:
- document
- add a function mapping an object to its type
- add default types for remaining built-in MAL values
- let defprotocol return the new protocol instead of last method
- set the right profile for abstract methods, improving error messages
- replace incomplete example with lots of tests

pprint:
- escape parenthesis in expected test results

[kanaka]
- explain in lib/README.md how to run tests/lib/*.
- rename folds to reducers and composition to threading
- move fib and sumdown from lib/ to tests/
2019-05-18 01:52:13 +02:00

11 lines
235 B
Plaintext

(load-file "../tests/computations.mal") ; fib sumdown
(load-file "../lib/perf.mal") ; time
;;(prn "Start: basic math/recursion test")
(time (do
(sumdown 10)
(fib 12)))
;;(prn "Done: basic math/recursion test")