On Mon, Mar 6, 2017 at 11:24 AM, Jacek Caban jacek@codeweavers.com wrote:
Hi Bruno,
Hi, thanks for the review ;-)
On 06.03.2017 05:24, Bruno Jesus wrote:
- ok(sz - 1 == lstrlenW(buffer), "Expected %u bytes, got %u\n", sz - 1, lstrlenW(buffer));
- if (flags & INTERNET_CONNECTION_MODEM)
ok(lstrlenW(buffer) == 0, "Expected 0 bytes, got %u\n", lstrlenW(buffer));
- else
ok(sz - 1 == lstrlenW(buffer), "Expected %u bytes, got %u\n", sz - 1, lstrlenW(buffer));
You're dropping sz value tests in case is set. What is it set to in this case? 0?
As a side note, you don't need strlen() to check if buffer is empty, something like !*buffer will do the trick.
You are right, I will make the change to test both !buffer[0] and sz == 0 in the three cases.