| 221 | } |
| 222 | |
| 223 | void TestStringHandler::testMatchBracedAsciiVariable() |
| 224 | { |
| 225 | QFETCH(QString, str); |
| 226 | QFETCH(int, openingBraceIndex); |
| 227 | QFETCH(int, closingBraceIndex); |
| 228 | |
| 229 | const auto variableLength = closingBraceIndex - openingBraceIndex - 1; |
| 230 | Q_ASSERT_X(variableLength > 0, Q_FUNC_INFO, "Wrong data."); |
| 231 | const auto match = matchPossiblyBracedAsciiVariable(QStringView{str}.sliced(openingBraceIndex)); |
| 232 | QCOMPARE(match.length, variableLength + 2); |
| 233 | QCOMPARE(match.name, str.mid(openingBraceIndex + 1, variableLength)); |
| 234 | } |
| 235 | |
| 236 | void TestStringHandler::testMatchBracedAsciiVariable_data() |
| 237 | { |