- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
Sure it does. You just have to figure out a way to work around it.
I mean...do you just throw your arms up in the air if you come across a 3rd party bug that you can't fix?
Admin
Admin
But for your code, that's the fix.
Admin
Example: with GMock, Google's supplement for GTest, Google's UT framework for C++, having mock return shared pointer causes crash on test end. It's old and very deep bug they haven't fixed for at least two years, and there's no workaround other than not returning shared pointers (which our real code heavily depends on). We learned to use custom-tailored stubs for such cases and it kinda sorta works, but still.
Admin
OK, now you're just being obtuse.
Sure, if the bug is that stuff crashes, you don't use it at all. Even so, having an automated test of this tells you when something like this happens the next time you have to upgrade that component.
Admin
Let's say you have a point. Because in reality, it's unlikely to encounter a bug that was fixed some versions ago but has returned. In development, it happens all the time. But in release quality products it's unlikely.
Also, the original discussion was about testing Adobe Dreamweaver CS3 - a giant window application, not some library. Do you realize how hard it is to write unit tests for window applications? Compared to, for example, remembering what not to do?
Admin
But you definitely might get a new bug that fails an old test.
Right, because you're testing!
Yeah, I don't really care about the original discussion in this discussion.
Admin
Admin
TDEMSYR
Goddamnit, THAT'S WHAT WE'VE BEEN TALKING ABOUT.
Admin
Admin
If you're testing a product that you depend on, that is what I'd call a conformance test. You expect an external program or library to behave in a certain way. You test to ensure this behaviour stays the same, either with new versions of the external product, or with new builds of your own product (which may use slightly different parameters).
Admin
All of those things you said are possible, where "correct" and "fix" are substituted with "report" and "workaround".
Automated testing has the same goal as any other form of testing: Increasing confidence. It doesn't matter if it's your own software or some 3rd party software you depend on, if you don't have confidence in it you can't have confidence in your end product.
Admin
This is an important point. I said unit testing is only worthwhile when the value of the increased confidence is higher than the cost of implementing the tests. Sometimes it's just not worth it, when the software under test is tightly coupled or has complex dependencies for example. I didn't say "100% automated test coverage" at any point, because that would be insane. What I did say is that 1st or 3rd party makes no difference.
Admin
Not true. It is rather likely in Discourse, and it's release quality. Jeff says so. Wow, it was hard to keep a straight face while typing that.
Admin
There's an emoticon for that. :smirk:
Admin
You said something totally different - that unit testing is worthwhile **because** the value of the increased confidence and so on. Post #77.Disregard that. I misread your post. Still, I felt like you're trying to say it's worthwhile to write a test that runs DW, opens 8K file and ensures it doesn't crash - which it isn't. With 1st party software it's perfectly reasonable code - except for "never should it ever" conditions like crazy sanity-checks that only fail if memory is corrupted or something, and for bugs in coverage measuring software (gcov for example frequently marks closing brackets in our C++ code as uncovered lines). It happened, yes. But it's unlikely to encounter such a piece of shit as Discourse.Admin
Admin
Filed under: Hanzo edit done right
Admin
No, the first comma is optional too. Or are you saying that the following is not well-formed?
I agree that both commas help avoid ambiguity, but that doesn't make either of them grammatically necessary. The original sentence is complicated but standard.
Admin
Relying on undefined behaviour is the source of the bug... Using +1 is just a workaround that might break tomorrow.