Mark Harmstone mark@harmstone.com writes:
On 8/4/21 6:06 pm, Alexandre Julliard wrote:
There is nothing MUI-specific about RtlLCIDToCultureName. The tests should go along with other similar functions in dlls/kernel32/tests/locale.c. It should also reuse the existing test data, there's no need to do exhaustive testing of all possible locales.
That's because my full MUI test is some 1400 lines long, which to my mind is substantial enough to warrant its own test...
I expect that if you put the various bits of your tests in the appropriate files, it will get smaller. For instance the loader tests already have tools to generate PE files, resources could be generated by the resource compiler, etc.
It can make sense to create your own files when you are developing, it makes life easier, especially if you are not sure where things will end up. But when merging upstream you need to make an effort to fit your code back into the existing framework.
Also, you want a ntdll function to be tested in the kernel32 test suite? That seems very counter-intuitive.
It's not very intuitive, but it happens quite a bit. Since kernel32 functions are often a thin wrapper around ntdll ones, it's easier to test both functions once, instead of duplicating the test data.
Finally, one thing I discovered, but left out of the test, is that Wine's custom kw-GB uses what's now a valid LCID for another language. You blatantly need full testing of all possible locales *somewhere*.
I don't think duplicating the entire locale data inside the tests is especially useful, but if you want to do it, locale.c is the logical place for it.