3 ms·
That's the caveat I mention in my second paragraph. But yes, if the tests are well-designed and built with actual real-world experience, I do treat them like r
by nostrademons 9y ago
That's the caveat I mention in my second paragraph.
But yes, if the tests are well-designed and built with actual real-world experience, I do treat them like real client code. Someone looking to use the library should be able to read the unit tests and have a pretty good idea what code they need to write and what pitfalls they'll encounter. And when the library is redesigned or refactored, the tests are first-class citizens; they aren't mindlessly updated to fit the new code, they're considered alongside other client code as something that may or may not have to change but ideally wouldn't.