Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
Qt Creator 4.7.2, Qt Creator 4.8.0
-
None
-
5ed848fd8f56e714d4c318dcb3f50ffd664dee15 (qt-creator/qt-creator/4.8)
Description
Here's the test with some cyrillic symbols
TEST(SomeTestCase, testUtf8) { EXPECT_EQ(QString("Привет"), QString("Приве")); }
And on test fail in the results pane I'm getting this
[==========] Running 1 test from 1 test case. [----------] Global test environment set-up. [----------] 1 test from SomeTestCase [ RUN ] SomeTestCase.testUtf8 ../src/dialog/tests/tst_plugin.cpp:55: Failure Expected equality of these values: QString("ÐÑивеÑ") Which is: "ÐÑивеÑ" QString("ÐÑиве") Which is: "ÐÑиве" [ FAILED ] SomeTestCase.testUtf8 (0 ms) [----------] 1 test from SomeTestCase (0 ms total) [----------] Global test environment tear-down [==========] 1 test from 1 test case ran. (0 ms total) [ PASSED ] 0 tests. [ FAILED ] 1 test, listed below: [ FAILED ] SomeTestCase.testUtf8
I think the reason for that is this code
void TestResultsPane::addOutput(const QByteArray &output) {
m_textOutput->appendPlainText(QString::fromLatin1(TestOutputReader::chopLineBreak(output)));
}
Is this just a bug or it's intentional?