cc64959602
It was suppressed unconditionally (albeit in different places and with different levels of obviousness) almost everywhere, due to inability to set the system locale in use by the implementation. Several test-cases used ISO-8859-1 encoding on Q_OS_MAC, where the tests were all suppressed anyway. A block of no_NO tests was #if 0'd out; and should, in any case, have been nb_NO. Tests of any locale but en_US were skipped on Q_OS_WIN because we can't set the locale (but including the tests of en_US tacitly assumed that's the system locale). If setlocale() failed, for ICU or DARWIN, the test was skipped; but we might as well check for this in the _data() to save repetition. The test was laboriously going through the sign cases; relocate the QString::compare() test's sign() function so that we can use it here, too, and simply QCOMPARE() signs. Introduce a TransientLocale class, copied from tst_QLocale, to take care of setting and restoring the locale using setlocale(). Change the locale name to a QByteArray so that we save having to convert it to one in order to pass it to setlocale(). Since that changed every _data() row, reformat those rows in the process - most of them were long lines. On the systems where we can't set the locale used by the function being tested, condition each block of tests in the _data() on whether LC_COLLATE looks like the locale to be tested, and report how a determined developer at least can (by repeatedly running the test with different locales set) test all the cases; and we'll attempt the ones that we can, when one of the relevant locales is in use. If that leaves us with no tests we can do, QSKIP() in the _data() to avoid an assert failure for "Test data requested, but no testdata available." Change-Id: I75709fda8827dcbe74f80c4136042054da6fcb13 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> |
||
---|---|---|
.. | ||
bic/data | ||
cmake | ||
concurrent | ||
corelib | ||
dbus | ||
gui | ||
guiapplauncher | ||
network | ||
opengl | ||
other | ||
printsupport | ||
shared | ||
sql | ||
testlib | ||
tools | ||
widgets | ||
xml | ||
CMakeLists.txt | ||
network-settings.h |