Andriy Palamarchuk apa3a@yahoo.com writes:
In the worst case people, who do not have such compiler will be able to run tests in ANSII mode only.
That's clearly not an option.
Here I don't agree with you. Programming with TCHAR is *exactly* the same as programming with WCHAR, but with different names. You think once - in WCHAR terms and get as a bonus ANSII version!
You don't think in WCHAR terms. There isn't a single real Unicode character in your test, it's all purely ASCII. That's the main problem with TCHAR, you have to stick to the lower common denominator, which means no Unicode chars, no multi-byte support, etc.
In fact, code became clearner after I removed "if (has_unicode()) " blocks, A<->W conversions, letters "A", "W" from API names. I feel that in this case I don't need to "think twice" - once in terms of ANSII, the second time - in terms of Unicode.
But we want people to think twice, and write a test adapted to the function they are testing; you don't test ASCII and Unicode the same way, except superficially.
This TCHAR crap is just a marketing tool to let Microsoft pretend that converting to Unicode is easy; but it's not usable in real life (how many apps do you know that ship both an A and a W exe?) We don't use it in Wine, and we must not use it in Wine tests either.