Testing edge cases and undocumented behavior
scott at open-vote.org
Tue Aug 30 09:22:24 CDT 2011
On 08/30/2011 04:05 AM, Joerg-Cyril.Hoehle at t-systems.com wrote:
> For instance, Scott Ritchie's example is not unusual:
> + * If lpszStr is Null, returns how long a formatted string would be.
> This is a very common pattern. Probably MSDN forgot to mention it.
> Expect apps to use that when they find out it works.
In this particular case, MSDN does mention it, however it doesn't
mention all the testable behavior such as exactly when the buffer isnt
modified. This is why once we test exhaustively like this our own API
docs end up being better than MSDN itself.
Incidentally, the tests themselves are very informative example code,
and if we were trying to create a resource for developers like MSDN
they'd probably have a place there.
> What I don't understand about Scott's patches is why there's half a
> dozen of them. One patch for the code, one for the tests about
> StrFromTimeInterval, possibly even join them.
A little birdie told me that Alexandre likes small incremental patches,
so I provided each test in the small increment that I noticed their need
in. It does seem like the sort of thing I should combine in the future
More information about the wine-devel