From: Dossy <do...@pa...> - 2002-04-08 19:45:46
|
On 2002.04.08, gu...@st... <gu...@st...> wrote: > Curt, please review the previous threads on the subject; we've been > over both of your points already. In brief -- as it is *right now*, > all the UIs simply display the exception message. We could either > > (a) redesign a lot of stuff to make at least 4 separate smarter UIs > (text runner, awt runner, swing runner, and ant task), or > > (b) just head the problem off upriver by altering the assertion > message. > > My patch does the latter -- by far the more expedient route, though it > seems to rub a whole lot of people's design sensibility the wrong way. > Including Kent's, which strikes us both (Kent and myself) as odd, > since Kent's a big fan of "make it work, make it right, in that > order." If you define "make it work" to include "preserve backward compatibility" then your patch doesn't "make it work" in my opinion. No offense meant by this, of course. The question is: how do you implement your patch while preserving backwards compatibility but giving people the option to get your new improved "string diff" assertion failure message? Selecting this "feature" at compile-time doesn't satisfy the requirement for "making it work" either. I think this is the "design issue" that Kent is trying to get us to think about. Or, maybe I'm really wrong here ... > (Basically, once we have instance variables for expected and actual, > we can have getMessage return anything we want -- my decision would be > to see the more legible message by default, and make people go out of > their way to see the complete strings, since 9 times out of 10 the > user doesn't care about the complete strings, just the parts that > differ.) However, the users in question might have investment in "stuff" (code, scripts, etc.) that rely on the current behavior of JUnit, and thus cannot afford to "upgrade" to a version which breaks all of that existing investment. They may desperately want to migrate to the newly improved output which gives the abbreviated strings that your patch provides, but maintaining backwards compatibility gives people a route to ease into it, rather than a hard landing. -- Dossy -- Dossy Shiobara mail: do...@pa... Panoptic Computer Network web: http://www.panoptic.com/ "He realized the fastest way to change is to laugh at your own folly -- then you can let go and quickly move on." (p. 70) |