Amirouche Boubekki writes: > Le 2015-12-03 14:54, Jan Synáček a écrit: >> Hello, >> >> does a unit test framework for GNU Guile exist? Something like >> "unittest" for Python for example. > > The unit test framework is srfi-64 [0]. You can find an example use in > 8sync [1]. Mind the fact that it doesn't use `test-group` which can be > required in complex settings. > > [...] > > [0] http://srfi.schemers.org/srfi-64/srfi-64.html > [1] https://notabug.org/cwebber/8sync/src/master/tests/test-agenda.scm
Yes, I borrowed that pattern from David Thompson (thanks Dave!). It's a quick and dirty way to do tests. Things could be better though... 8sync does not report each individual test's success/failure count in the final result, just the whole module. I think we could probably improve upon things. However, I *do* recommend setting up something like this as early as absolutely possible. Moving REPL experiments you hack on into tests as soon as you verify that they work is a great way to build up tests without hating doing it. - Chris
