summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib')
-rw-r--r--tests/auto/corelib/global/qflags/tst_qflags.cpp2
-rw-r--r--tests/auto/corelib/thread/qthreadstorage/test/test.pro4
-rw-r--r--tests/auto/corelib/tools/qlocale/tst_qlocale.cpp17
-rw-r--r--tests/auto/corelib/tools/qregexp/tst_qregexp.cpp6
4 files changed, 25 insertions, 4 deletions
diff --git a/tests/auto/corelib/global/qflags/tst_qflags.cpp b/tests/auto/corelib/global/qflags/tst_qflags.cpp
index 2794c174ba..7f67f3a612 100644
--- a/tests/auto/corelib/global/qflags/tst_qflags.cpp
+++ b/tests/auto/corelib/global/qflags/tst_qflags.cpp
@@ -106,7 +106,7 @@ void tst_QFlags::constExpr()
switch (btn) {
case Qt::LeftButton: QVERIFY(false); break;
case Qt::RightButton: QVERIFY(false); break;
- case Qt::LeftButton | Qt::RightButton: QVERIFY(true); break;
+ case int(Qt::LeftButton | Qt::RightButton): QVERIFY(true); break;
default: QVERIFY(false);
}
diff --git a/tests/auto/corelib/thread/qthreadstorage/test/test.pro b/tests/auto/corelib/thread/qthreadstorage/test/test.pro
index a7d8eb0106..cfbf5bf5a4 100644
--- a/tests/auto/corelib/thread/qthreadstorage/test/test.pro
+++ b/tests/auto/corelib/thread/qthreadstorage/test/test.pro
@@ -4,3 +4,7 @@ CONFIG -= app_bundle
CONFIG += console
QT = core testlib
SOURCES = ../tst_qthreadstorage.cpp
+
+load(testcase) # for installTestHelperApp()
+installTestHelperApp("../crashonexit/crashonexit",crashonexit,crashonexit)
+
diff --git a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
index 761d3ec928..7e12e42107 100644
--- a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
+++ b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
@@ -133,6 +133,8 @@ private slots:
void weekendDays();
void listPatterns();
+ void measurementSystems();
+
private:
QString m_decimal, m_thousand, m_sdate, m_ldate, m_time;
QString m_sysapp;
@@ -2034,5 +2036,20 @@ void tst_QLocale::listPatterns()
QCOMPARE(zh_CN.createSeparatedList(sl5), QString::fromUtf8("aaa" "\xe3\x80\x81" "bbb" "\xe3\x80\x81" "ccc" "\xe5\x92\x8c" "ddd"));
}
+void tst_QLocale::measurementSystems()
+{
+ QLocale locale(QLocale::English, QLocale::UnitedStates);
+ QCOMPARE(locale.measurementSystem(), QLocale::ImperialUSSystem);
+
+ locale = QLocale(QLocale::English, QLocale::UnitedKingdom);
+ QCOMPARE(locale.measurementSystem(), QLocale::ImperialUKSystem);
+
+ locale = QLocale(QLocale::English, QLocale::Australia);
+ QCOMPARE(locale.measurementSystem(), QLocale::MetricSystem);
+
+ locale = QLocale(QLocale::German);
+ QCOMPARE(locale.measurementSystem(), QLocale::MetricSystem);
+}
+
QTEST_MAIN(tst_QLocale)
#include "tst_qlocale.moc"
diff --git a/tests/auto/corelib/tools/qregexp/tst_qregexp.cpp b/tests/auto/corelib/tools/qregexp/tst_qregexp.cpp
index 5470de76ee..4e1fba5fcb 100644
--- a/tests/auto/corelib/tools/qregexp/tst_qregexp.cpp
+++ b/tests/auto/corelib/tools/qregexp/tst_qregexp.cpp
@@ -137,12 +137,10 @@ void tst_QRegExp::indexIn_data()
<< QStringList();
QTest::newRow(qPrintable(stri + "anc09")) << QString("a(?:(?!)|b)z") << QString("abz") << 0 << 3
<< QStringList();
-#if 0
- QTest::newRow(qPrintable(stri + "anc10")) << QString("a?(?=^b$)") << QString("ab") << 0 << 1
+ QTest::newRow(qPrintable(stri + "anc10")) << QString("a?(?=^b$)") << QString("ab") << -1 << -1
<< QStringList();
QTest::newRow(qPrintable(stri + "anc11")) << QString("a?(?=^b$)") << QString("b") << 0 << 0
<< QStringList();
-#endif
// back-references
QTest::newRow(qPrintable(stri + "bref00")) << QString("(a*)(\\1)") << QString("aaaaa") << 0 << 4
@@ -573,6 +571,7 @@ void tst_QRegExp::indexIn()
int mylen = rx.matchedLength();
QStringList mycaps = rx.capturedTexts();
+ QEXPECT_FAIL("anc11", "QRegExp has bugs with anchors inside lookaheads", Abort);
QCOMPARE( mypos, pos );
QCOMPARE( mylen, len );
if ( caps.size() > 1 && caps[1] != "IGNORE ME" ) {
@@ -626,6 +625,7 @@ void tst_QRegExp::lastIndexIn()
QStringList mycaps = rx.capturedTexts();
if ( mypos <= pos || pos == -1 ) {
+ QEXPECT_FAIL("anc11", "QRegExp has bugs with anchors inside lookaheads", Abort);
QCOMPARE( mypos, pos );
QCOMPARE( mylen, len );