Closed Luv2C0d3 closed 1 year ago
Thanks for contributing. I think that adding tests is a good idea. Keeping things small and simple is the goal. So as long as the project has no dependencies on other projects and the project structure is clear (to beginners) then I'm OK with adding test. Adding tests as a separate directory to build and run is my preference. So it won't "clutter" the root directory.
PLEASE DO NOT MERGE THIS!!!
Hello, prof Van Engelen. Thanks for setting up this project. I was playing a bit with it trying to add tests and I needed to re-factor a things in order to be able to use Unity which is a test framework extremely lightweight, for embedded projects. I copied
tinylisp-commented.c
and created a variant calledtinylisp-tested.c
, where I abstracted the initialization totinylisp_init()
and moved some things totinylisp.h
, such that I could re-initialize the system / re-use things from the test cases in filetest-tl-test.c
.My question is whether you think this would add value? Based on that I will keep playing and possibly after having good tests for the main mechanisms, thus scan, read, parse, list, I would proceed with LISP based tests as it seems more fun and self-hosted.