2 ms·
"the idea of immediate compilation and "unit tests" appeals to me only rarely, when I’m feeling my way in a totally unknown environment and need feedback about
by crististm 7y ago
"the idea of immediate compilation and "unit tests" appeals to me only rarely, when I’m feeling my way in a totally unknown environment and need feedback about what works"
I've had to check myself and indeed we have different ideas about the meaning of "speaking against unit tests".
Did you know about all the tests he wrote and run for TEX? There's a book about it as well.
- svat 7y agoFor TeX he has written a single large test called the TRIP test: described in "A torture test for TeX" (http://texdoc.net/pkg/tripman http://texdoc.net/pkg/tripman). This is a conformance test (to weed out bad reimplementations), written after TeX was written and debugged. (See https://texfaq.org/FAQ-triptrap https://texfaq.org/FAQ-triptrap for details.) Apart from this report there isn't a separate book about testing TeX specifically, though there is a TeX manual (The TeXbook, Volume A of Computers and Typesetting), the TeX source code as a book (Volume B, roughly equivalent to this: http://texdoc.net/pkg/tex http://texdoc.net/pkg/tex), and there's also a nice paper called The Errors of TeX (https://yurichev.com/mirrors/knuth1989.pdf https://yurichev.com/mirrors/knuth1989.pdf), supplemented by a changelog (http://texdoc.net/pkg/errorlog http://texdoc.net/pkg/errorlog). By "unit tests" Knuth is speaking of tests that each test just one part of the program in isolation, mocking out the rest, and also more broadly about the practice of "test-driven development" which has this as its prerequisite. He means he finds it simpler to just write the whole program up front, and test it wholesale.
- rumanator 7y agoIt sounds like his experience is drawn mainly from being a one-man team working on his one-man projects. Even in real hard engineering fields we see teams responsible for specific subsystems and components, which they need to test and validate.