path: root/tests
diff options
authorThiago Macieira <>2014-01-16 20:37:16 -0800
committerThe Qt Project <>2014-01-22 00:04:16 +0100
commit2d8028d696a86102a7753f9d59fb41f4170181a8 (patch)
tree761a4c67e915fd49d4c342cdaba2772f1097413c /tests
parent57d36d3f0cbbf641bb67f7f183edcb52aa15180d (diff)
Fix the alignment for non-ASCII strings
d040681b6f3d03b349e9b9487fe89a611d03ee3c added support for aligning the test results for easier side-by-side comparison of the actual and expected values. However, it didn't take into account multibyte strings. That is, we would see: FAIL! tst_testcase::testcase: Compared values are not the same Actual (QString("é")): F0O Expected (expected) : FOO We use mbstowcs (multibyte string to wide char string) that calculates the length in wide chars of the output string. That's roughly equivalent to QString::fromLocal8Bit(string).toUcs4().size(). Change-Id: Ic2649951c50e05143da32a7fbef00a01e385c542 Reviewed-by: Jason McDonald <>
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions