OSDN Git Service

correct and verify codepoint conversion in tst_QChar::normalization_data()
authorIvailo Monev <xakepa10@laimg.moc>
Tue, 24 Dec 2019 22:23:15 +0000 (22:23 +0000)
committerIvailo Monev <xakepa10@laimg.moc>
Tue, 24 Dec 2019 22:23:15 +0000 (22:23 +0000)
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
tests/auto/qchar/tst_qchar.cpp

index cb656db..445dfd6 100644 (file)
@@ -517,7 +517,8 @@ void tst_QChar::normalization_data()
 
             for (int j = 0; j < c.size(); ++j) {
                 bool ok;
-                uint uc = c.at(j).toInt(&ok, 16);
+                uint uc = c.at(j).toUInt(&ok, 16);
+                QVERIFY(ok);
                 if (!QChar::requiresSurrogates(uc)) {
                     columns[i].append(QChar(uc));
                 } else {