tests/auto/qregexp/tst_qregexp.cpp
changeset 37 758a864f9613
parent 30 5dc02b23752f
equal deleted inserted replaced
36:ef0373b55136 37:758a864f9613
   103     void reentrancy();
   103     void reentrancy();
   104     void threadsafeEngineCache();
   104     void threadsafeEngineCache();
   105 
   105 
   106     void QTBUG_7049_data();
   106     void QTBUG_7049_data();
   107     void QTBUG_7049();
   107     void QTBUG_7049();
       
   108     void interval();
   108 };
   109 };
   109 
   110 
   110 // Testing get/set functions
   111 // Testing get/set functions
   111 void tst_QRegExp::getSetCheck()
   112 void tst_QRegExp::getSetCheck()
   112 {
   113 {
  1424     QCOMPARE( re.cap(1), cap1 );
  1425     QCOMPARE( re.cap(1), cap1 );
  1425     QCOMPARE( re.cap(2).isNull(), cap2.isNull() );
  1426     QCOMPARE( re.cap(2).isNull(), cap2.isNull() );
  1426     QCOMPARE( re.cap(2), cap2 );
  1427     QCOMPARE( re.cap(2), cap2 );
  1427 }
  1428 }
  1428 
  1429 
       
  1430 void tst_QRegExp::interval()
       
  1431 {
       
  1432     {
       
  1433         QRegExp exp("a{0,1}");
       
  1434         QVERIFY(exp.isValid());
       
  1435     }
       
  1436     {
       
  1437         QRegExp exp("a{1,1}");
       
  1438         QVERIFY(exp.isValid());
       
  1439     }
       
  1440     {
       
  1441         QRegExp exp("a{1,0}");
       
  1442         QVERIFY(!exp.isValid());
       
  1443     }
       
  1444 }
       
  1445 
       
  1446 
  1429 QTEST_APPLESS_MAIN(tst_QRegExp)
  1447 QTEST_APPLESS_MAIN(tst_QRegExp)
  1430 #include "tst_qregexp.moc"
  1448 #include "tst_qregexp.moc"