RSS Feed

Lisp Project of the Day

breeze

You can support this project by donating at:

Donate using PatreonDonate using Liberapay

Or see the list of project sponsors.

breezeideslimetesting

Documentation🥺
Docstrings😀
Tests 😀
Examples🥺
RepositoryActivity🥺
CI 🥺

This project is still in the development phase but I like its idea. Breeze tries to improve the development process. An especially interesting feature: its ability to run tests on function redefinition!

To make it work, you have to use defun and deftest from breeze:

POFTHEDAY> (breeze:defun foo ()
             100)

;; When we define the test, it is immediately
;; run in a separate thread:
POFTHEDAY> (breeze:deftest test-foo
             (unless (= (foo) 42)
               (error "Foo should return 42")))
Running all tests...
WARNING: 
Test TEST-FOO failed with condition Foo should return 42

Test "TEST-FOO" failed with condition:
"Foo should return 42"
Done [0/1] tests passed.

;; Now I'm going to fix it.
;; Pay attention on the output. Breeze automatically
;; runs tests of the 'foo function in a separate thread:
POFTHEDAY> (breeze:defun foo ()
             42)
Running all tests....
Done [1/1] tests passed.

;; Now let's break it again!
POFTHEDAY> (breeze:defun foo ()
             77)
FOO
Running all tests...
WARNING: 
Test TEST-FOO failed with condition Foo should return 42

Test "TEST-FOO" failed with condition:
"Foo should return 42"
Done [0/1] tests passed.

There is also some extension for Emacs and SLIME, but I didn't test it yet. I hope the author will make this system more usable.

The first feature which comes to mind is support for existing unit-testing frameworks. The second is an indicator for the Emacs mode-line if some tests failed after I hit C-c C-c.

To conclude, make good tooling! Tooling should be convenient!


Brought to you by 40Ants under Creative Commons License