Le 30/10/2012 09:18, Hans Leidekker a écrit :
On Tue, 2012-10-30 at 08:42 +0100, Christian Costa wrote:
This is almost the same as your first try. You're testing a trivial case only - ASCII range. I feel like it should behave more like memcmp for case insensitive comparison, that's what documentation mildly suggests.
Well, It's not the same implementation. It's ordinal now. I have test for that. And how can memcmp be used for insensitive comparison?
Have a look at memicmpW.
Just by curiosity. What the difference with strncmpW?
Do you have a concrete example that does not work with this implementation
How about CompareStringOrdinal( "a\0a", 3, "a\0b", 3 )?
There is a similar test in the patch:
WCHAR test1[] = { 't','e','s','t',0 }; WCHAR test3[] = { 't','e','s','t','3',0 };
ret = pCompareStringOrdinal(test1, 5, test3, 5, TRUE); ok(ret == CSTR_LESS_THAN, "Got %u, expected %u\n", ret, CSTR_LESS_THAN);