mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-07 14:31:31 +00:00
ICU-13102 - Add logKnownIssue and skip problematic locales in format/NumberFormatTest/TestHost for now.
X-SVN-Rev: 40015
This commit is contained in:
parent
2a722c9b5a
commit
43cf6dbe27
2 changed files with 20 additions and 3 deletions
|
@ -28,6 +28,8 @@
|
|||
#include "winutil.h"
|
||||
#include "winnmtst.h"
|
||||
|
||||
#include "numfmtst.h"
|
||||
|
||||
#include "cmemory.h"
|
||||
#include "cstring.h"
|
||||
#include "locmap.h"
|
||||
|
@ -268,7 +270,7 @@ static void testLocale(const char *localeID, int32_t lcid, NumberFormat *wnf, UB
|
|||
}
|
||||
}
|
||||
|
||||
void Win32NumberTest::testLocales(TestLog *log)
|
||||
void Win32NumberTest::testLocales(NumberFormatTest *log)
|
||||
{
|
||||
int32_t lcidCount = 0;
|
||||
Win32Utilities::LCIDRecord *lcidRecords = Win32Utilities::getLocales(lcidCount);
|
||||
|
@ -282,6 +284,21 @@ void Win32NumberTest::testLocales(TestLog *log)
|
|||
continue;
|
||||
}
|
||||
|
||||
// Some locales have had their names change over various OS releases; skip them in the test for now.
|
||||
int32_t failingLocaleLCIDs[] = {
|
||||
0x040a, /* es-ES_tradnl;es-ES-u-co-trad; */
|
||||
0x048c, /* fa-AF;prs-AF;prs-Arab-AF; */
|
||||
0x046b, /* qu-BO;quz-BO;quz-Latn-BO; */
|
||||
0x086b, /* qu-EC;quz-EC;quz-Latn-EC; */
|
||||
0x0c6b, /* qu-PE;quz-PE;quz-Latn-PE; */
|
||||
0x0492 /* ckb-IQ;ku-Arab-IQ; */
|
||||
};
|
||||
bool skip = (std::find(std::begin(failingLocaleLCIDs), std::end(failingLocaleLCIDs), lcidRecords[i].lcid) != std::end(failingLocaleLCIDs));
|
||||
if (skip && log->logKnownIssue("13119", "Windows '@compat=host' fails on down-level versions of the OS")) {
|
||||
log->logln("ticket:13119 - Skipping LCID = 0x%04x", lcidRecords[i].lcid);
|
||||
continue;
|
||||
}
|
||||
|
||||
strcpy(localeID, lcidRecords[i].localeID);
|
||||
|
||||
if (strchr(localeID, '@') > 0) {
|
||||
|
|
|
@ -25,12 +25,12 @@
|
|||
* \brief C++ API: Format dates using Windows API.
|
||||
*/
|
||||
|
||||
class TestLog;
|
||||
class NumberFormatTest;
|
||||
|
||||
class Win32NumberTest
|
||||
{
|
||||
public:
|
||||
static void testLocales(TestLog *log);
|
||||
static void testLocales(NumberFormatTest *log);
|
||||
|
||||
private:
|
||||
Win32NumberTest();
|
||||
|
|
Loading…
Add table
Reference in a new issue