orthecreedence / cl-hash-util

A small hash utility library for Common Lisp
MIT License
29 stars 3 forks source link

The tests shouldn't a global value which is destructively modified #9

Closed Yehouda closed 3 months ago

Yehouda commented 4 years ago

The tests currently use the variable HT, and destructively modify in setf-hget, and hget also tries to modify it. As it is, if you run the test setf-hget before hget (5am does not guarantee the order) then hget. Also if you run setf-hget again without force reloading the tests it fails.

The tests should really bind ht lexically, for example: (test hget (let ((ht (hash ('a (hash ('b 3)))))) ....