4 ms·
I write parsers all the time. Why wouldn’t you test parsers in isolation?
by yakshaving_jgt 1y ago
I write parsers all the time.
Why wouldn’t you test parsers in isolation?
- simianwords 1y agoSure but not everyone is working at this level. Dogmatically writing unit tests where they don’t bring much value is something that happens all the time and needs to stop. No one actually evaluates whether unit tests are needed. Unit tests at least in my experience, are needed sparingly - in specific places that encompass slightly complicated well contained logic.
- yakshaving_jgt 1y agoI think parsing happens in more places than people might think. https://lexi-lambda.github.io/blog/2019/11/05/parse-don-t-validate/ https://lexi-lambda.github.io/blog/2019/11/05/parse-don-t-va...
- simianwords 1y agoyeah and if I it pops up I might write a unit test for it. i don't wanna be forced to write it for every damn thing.
- yakshaving_jgt 1y agoWho is forcing you?
- simianwords 1y agopeople who cargo cult unit tests dogmatically by creating rules like: every class or a public method must have a unit test associated with it.