tests/auto/qbytearraymatcher/tst_qbytearraymatcher.cpp
branchRCL_3
changeset 13 c0432d11811c
parent 4 3b1da2848fc7
equal deleted inserted replaced
12:cc75c76972ee 13:c0432d11811c
    67     matcher1 = QByteArrayMatcher(QByteArray(needle));
    67     matcher1 = QByteArrayMatcher(QByteArray(needle));
    68     QByteArrayMatcher matcher2;
    68     QByteArrayMatcher matcher2;
    69     matcher2.setPattern(QByteArray(needle));
    69     matcher2.setPattern(QByteArray(needle));
    70 
    70 
    71     QByteArrayMatcher matcher3 = QByteArrayMatcher(QByteArray(needle));
    71     QByteArrayMatcher matcher3 = QByteArrayMatcher(QByteArray(needle));
    72     QByteArrayMatcher matcher4(needle, sizeof(needle - 1));
    72     QByteArrayMatcher matcher4(needle, sizeof(needle) - 1);
    73     QByteArrayMatcher matcher5(matcher2);
    73     QByteArrayMatcher matcher5(matcher2);
    74     QByteArrayMatcher matcher6;
    74     QByteArrayMatcher matcher6;
    75     matcher6 = matcher3;
    75     matcher6 = matcher3;
    76 
    76 
    77     QCOMPARE(matcher1.indexIn(haystack), 42);
    77     QCOMPARE(matcher1.indexIn(haystack), 42);