summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2019-01-25 10:17:18 +0100
committerLars Knoll <lars.knoll@qt.io>2019-02-09 08:01:16 +0000
commit79f2a9e666a241c5baba1b9bf35c12be4cefcc26 (patch)
tree9631c80826c50d2086eb4a7bf9caec442724f57c /tests
parent4247d7c5a0c9a5133245b935eef017149f49de87 (diff)
Fix an assertion in the BiDi algorithm
The algorithm has been treating DirB inconsistently so far. initScriptAnalysisAndIsolatePairs was treating it differently than generateDireationalRuns leading to assertions. It wasn't visible in our test data, as DirB is in almost all cases the paragraph separator, where we split strings anyway. Change-Id: I7dc0e7bbcf30ee84d8781ea06097da023e371f05 Fixes: QTBUG-73238 Reviewed-by: Robert Loehning <robert.loehning@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/other/qcomplextext/tst_qcomplextext.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/auto/other/qcomplextext/tst_qcomplextext.cpp b/tests/auto/other/qcomplextext/tst_qcomplextext.cpp
index 0116e546a0..c328776089 100644
--- a/tests/auto/other/qcomplextext/tst_qcomplextext.cpp
+++ b/tests/auto/other/qcomplextext/tst_qcomplextext.cpp
@@ -68,6 +68,12 @@ void tst_QComplexText::bidiReorderString_data()
<< (int) data->basicDir;
data++;
}
+
+ QString isolateAndBoundary = QString(QChar(0x2068 /* DirFSI */)) + QChar(0x1c /* DirB */) + QChar(0x2069 /* DirPDI */);
+ QTest::newRow( "isolateAndBoundary" )
+ << QString::fromUtf8( data->logical )
+ << QString::fromUtf8( data->visual )
+ << (int) QChar::DirL;
}
void tst_QComplexText::bidiReorderString()