Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Lexer/Parsers are one of the few software engineering tasks I do routinely where it's self evident that TDD is useful and the tests will remain useful afterwards.


Indeed! I recall a lexer and parser built via TDD with a test suite that specified every detail of a DSL. A few years later, both were rewritten completely from scratch while all the tests stayed the same. When we got to passing all tests, it was working exactly as before, only much more efficiently.

From that experience, I would say that in some contexts, tests shouldn't be removed unless what it's testing is no longer being used.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: