Testing WideCharToMultiByte

Alexandre Julliard julliard at winehq.org
Tue Dec 20 14:53:04 CST 2005


Bill Medland <billmedland at mercuryspeed.com> writes:

> Has anyone ever done a proper investigation into the edges of 
> WideCharToMultiByte?  I was quite surprised to see that given 
> how important it is there is no test for it (or am I blind?)

There are a few in dlls/kernel/tests/codepage.c.

> I am investigating a potential off-by-one in msi and want to know 
> very exactly what is supposed to happen in the edge cases (e.g. 
> specifying a length of 0 or a length that does not actually 
> include a terminating null character or ...).
>
> If no-one else is involved then I am prepared to do a little 
> investigation and write the tests but I guess we don't want to 
> start adding tests like that at this late stage, or do we?

I don't see why not, it's never too late to add tests. There probably
isn't much point in testing normal functionality since the function is
already used all over the place, so any regression there would be
spotted quickly. But if you find some interesting edge cases by all
means add tests for them.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list