QTest::newRow("test_name") << url.search << "?a=\\" has an issue with escaping bashslashes. The last string contains two backslashes where the first one escapes the second one. I would expect the bytes of the string to be ['?', 'a', '=', '\\', '\0'] but instead the returned  value is "?a=\\". When taking a look at the first few function calls it seems the string is parsed properly with only one backslash. It is deeper inside the QTest machinery that something goes wrong. The position of the "\\" does not seem to matter. Here is a complete example: void tst_urlobject::urlObject_search_data() {        QTest::addColumn("test");     QTest::addColumn("expected"); QTest::newRow("Question mark")             << url.search             << "?a=\\"; }