lispci / fiveam

Common Lisp regression testing framework
BSD 3-Clause "New" or "Revised" License
185 stars 31 forks source link

Avoid using eval inside def-test #78

Open digikar99 opened 3 years ago

digikar99 commented 3 years ago

Is there a reason about why things are the way they are?

For my purposes, the use of eval (or even compile) causes a significant overhead (several times as much as the system-to-be-tested itself) in repeated loads of the same system.

Edit: This does break code-containing-macros-with-helper-functions if the tests are in the same file, but I do think this is worth it in the longer run unless there are some other issues.

Edit 2: I'm not entirely sure about merging this; one could try, but in quicklisp alone, there are 300+ systems that depend on fiveam; one could always revert if too many things break.

Edit 3: This also fixes "Fiveam cannot find variables declared in a closure surrounding the test. For example, the following fails." mentioned at https://sabracrolleton.github.io/testing-framework#orga8e7410