diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2009-04-17 10:53:44 (GMT) |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2009-04-17 10:53:44 (GMT) |
commit | 160252d5d1facf2a53af1314836f22fb00784625 (patch) | |
tree | e1a6a0be850671e32af0306ffd8b0c4a780da720 /tests/auto/qregexp/tst_qregexp.cpp | |
parent | fd73185195633fd97228a0c832c247b761967598 (diff) | |
parent | cfa04d53ff58d45d7811637c8be76099740d25c5 (diff) | |
download | Qt-160252d5d1facf2a53af1314836f22fb00784625.zip Qt-160252d5d1facf2a53af1314836f22fb00784625.tar.gz Qt-160252d5d1facf2a53af1314836f22fb00784625.tar.bz2 |
Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qt
Conflicts:
tests/auto/qpainterpath/tst_qpainterpath.cpp
Diffstat (limited to 'tests/auto/qregexp/tst_qregexp.cpp')
-rw-r--r-- | tests/auto/qregexp/tst_qregexp.cpp | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/tests/auto/qregexp/tst_qregexp.cpp b/tests/auto/qregexp/tst_qregexp.cpp index 2968a8e..999166e 100644 --- a/tests/auto/qregexp/tst_qregexp.cpp +++ b/tests/auto/qregexp/tst_qregexp.cpp @@ -557,7 +557,6 @@ void tst_QRegExp::setMinimal() void tst_QRegExp::exactMatch() { -#if QT_VERSION >= 0x030100 QRegExp rx_d( "\\d" ); QRegExp rx_s( "\\s" ); QRegExp rx_w( "\\w" ); @@ -570,9 +569,7 @@ void tst_QRegExp::exactMatch() bool is_d = ( ch.category() == QChar::Number_DecimalDigit ); bool is_s = ch.isSpace(); bool is_w = ( ch.isLetterOrNumber() -#if QT_VERSION >= 0x040200 || ch.isMark() -#endif || ch == '_' ); QVERIFY( rx_d.exactMatch(QString(ch)) == is_d ); @@ -582,7 +579,6 @@ void tst_QRegExp::exactMatch() QVERIFY( rx_S.exactMatch(QString(ch)) != is_s ); QVERIFY( rx_W.exactMatch(QString(ch)) != is_w ); } -#endif } void tst_QRegExp::capturedTexts() @@ -593,13 +589,11 @@ void tst_QRegExp::capturedTexts() QCOMPARE(rx1.cap(0), QString("aaa")); QCOMPARE(rx1.cap(1), QString("aaa")); -#if QT_VERSION >= 0x040200 QRegExp rx2("a*(a*)", Qt::CaseSensitive, QRegExp::RegExp2); rx2.exactMatch("aaa"); QCOMPARE(rx2.matchedLength(), 3); QCOMPARE(rx2.cap(0), QString("aaa")); QCOMPARE(rx2.cap(1), QString("")); -#endif QRegExp rx3("(?:a|aa)(a*)", Qt::CaseSensitive, QRegExp::RegExp); rx3.exactMatch("aaa"); @@ -607,13 +601,11 @@ void tst_QRegExp::capturedTexts() QCOMPARE(rx3.cap(0), QString("aaa")); QCOMPARE(rx3.cap(1), QString("aa")); -#if QT_VERSION >= 0x040200 QRegExp rx4("(?:a|aa)(a*)", Qt::CaseSensitive, QRegExp::RegExp2); rx4.exactMatch("aaa"); QCOMPARE(rx4.matchedLength(), 3); QCOMPARE(rx4.cap(0), QString("aaa")); QCOMPARE(rx4.cap(1), QString("a")); -#endif QRegExp rx5("(a)*(a*)", Qt::CaseSensitive, QRegExp::RegExp); rx5.exactMatch("aaa"); @@ -622,14 +614,12 @@ void tst_QRegExp::capturedTexts() QCOMPARE(rx5.cap(1), QString("a")); QCOMPARE(rx5.cap(2), QString("aa")); -#if QT_VERSION >= 0x040200 QRegExp rx6("(a)*(a*)", Qt::CaseSensitive, QRegExp::RegExp2); rx6.exactMatch("aaa"); QCOMPARE(rx6.matchedLength(), 3); QCOMPARE(rx6.cap(0), QString("aaa")); QCOMPARE(rx6.cap(1), QString("a")); QCOMPARE(rx6.cap(2), QString("")); -#endif QRegExp rx7("([A-Za-z_])([A-Za-z_0-9]*)"); rx7.setCaseSensitivity(Qt::CaseSensitive); @@ -689,7 +679,6 @@ void tst_QRegExp::indexIn() } } -#if QT_VERSION >= 0x040200 // same as above, but with RegExp2 { QRegExp rx( regexpStr, Qt::CaseSensitive, QRegExp::RegExp2 ); @@ -707,7 +696,6 @@ void tst_QRegExp::indexIn() QCOMPARE( mycaps[i], caps[i] ); } } -#endif } void tst_QRegExp::lastIndexIn() @@ -746,7 +734,6 @@ void tst_QRegExp::lastIndexIn() } } -#if QT_VERSION >= 0x040200 { QRegExp rx( regexpStr, Qt::CaseSensitive, QRegExp::RegExp2 ); QVERIFY( rx.isValid() ); @@ -766,7 +753,6 @@ void tst_QRegExp::lastIndexIn() } } } -#endif } void tst_QRegExp::matchedLength() @@ -1161,10 +1147,8 @@ void tst_QRegExp::prepareEngineOptimization() QRegExp rx4("foo", Qt::CaseInsensitive, QRegExp::RegExp); QVERIFY(rx4.isValid()); -#if QT_VERSION >= 0x040200 QRegExp rx5("foo", Qt::CaseInsensitive, QRegExp::RegExp2); QVERIFY(rx5.isValid()); -#endif QRegExp rx6("foo", Qt::CaseInsensitive, QRegExp::FixedString); QVERIFY(rx6.isValid()); @@ -1175,10 +1159,8 @@ void tst_QRegExp::prepareEngineOptimization() QRegExp rx8("][", Qt::CaseInsensitive, QRegExp::RegExp); QVERIFY(!rx8.isValid()); -#if QT_VERSION >= 0x040200 QRegExp rx9("][", Qt::CaseInsensitive, QRegExp::RegExp2); QVERIFY(!rx9.isValid()); -#endif QRegExp rx10("][", Qt::CaseInsensitive, QRegExp::Wildcard); QVERIFY(!rx10.isValid()); |