diff options
author | Bradley T. Hughes <bradley.hughes@nokia.com> | 2009-06-26 08:56:28 (GMT) |
---|---|---|
committer | Bradley T. Hughes <bradley.hughes@nokia.com> | 2009-06-26 08:56:28 (GMT) |
commit | 0bbd4db2eed7092c58c36867033fc21d8b86bcd9 (patch) | |
tree | f47b347072e72a2b241ad1e2846bef03bd927015 /tests | |
parent | 36d6dc5666b102d8401daa01243b4736203f8848 (diff) | |
parent | 9ac5755fb53387a79e5d9c007501800ab9963bed (diff) | |
download | Qt-0bbd4db2eed7092c58c36867033fc21d8b86bcd9.zip Qt-0bbd4db2eed7092c58c36867033fc21d8b86bcd9.tar.gz Qt-0bbd4db2eed7092c58c36867033fc21d8b86bcd9.tar.bz2 |
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt
Diffstat (limited to 'tests')
7 files changed, 23 insertions, 3 deletions
diff --git a/tests/auto/qscriptengine/qscriptengine.pro b/tests/auto/qscriptengine/qscriptengine.pro index cf3ced3..b5aa621 100644 --- a/tests/auto/qscriptengine/qscriptengine.pro +++ b/tests/auto/qscriptengine/qscriptengine.pro @@ -1,6 +1,7 @@ load(qttest_p4) QT += script SOURCES += tst_qscriptengine.cpp +DEFINES += SRCDIR=\\\"$$PWD\\\" wince*: { addFiles.sources = script diff --git a/tests/auto/qscriptengine/tst_qscriptengine.cpp b/tests/auto/qscriptengine/tst_qscriptengine.cpp index 68df392..c17454d 100644 --- a/tests/auto/qscriptengine/tst_qscriptengine.cpp +++ b/tests/auto/qscriptengine/tst_qscriptengine.cpp @@ -1562,7 +1562,7 @@ static QScriptValue __import__(QScriptContext *ctx, QScriptEngine *eng) void tst_QScriptEngine::importExtension() { QStringList libPaths = QCoreApplication::instance()->libraryPaths(); - QCoreApplication::instance()->setLibraryPaths(QStringList() << "."); + QCoreApplication::instance()->setLibraryPaths(QStringList() << SRCDIR); QStringList availableExtensions; { diff --git a/tests/auto/qscriptjstestsuite/qscriptjstestsuite.pro b/tests/auto/qscriptjstestsuite/qscriptjstestsuite.pro index b8109cc..f6a6aeb 100644 --- a/tests/auto/qscriptjstestsuite/qscriptjstestsuite.pro +++ b/tests/auto/qscriptjstestsuite/qscriptjstestsuite.pro @@ -1,6 +1,7 @@ load(qttest_p4) QT = core script SOURCES += tst_qscriptjstestsuite.cpp +DEFINES += SRCDIR=\\\"$$PWD\\\" wince*: { testFiles.sources = tests diff --git a/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp b/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp index 66004f8..0194730 100644 --- a/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp +++ b/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp @@ -389,7 +389,7 @@ int tst_Suite::qt_metacall(QMetaObject::Call _c, int _id, void **_a) tst_Suite::tst_Suite() { - testsDir = QDir("."); + testsDir = QDir(SRCDIR); bool testsFound = testsDir.cd("tests"); if (!testsFound) { qWarning("*** no tests/ dir!"); diff --git a/tests/auto/qscriptv8testsuite/qscriptv8testsuite.pro b/tests/auto/qscriptv8testsuite/qscriptv8testsuite.pro index 9e35801..c07ab53 100644 --- a/tests/auto/qscriptv8testsuite/qscriptv8testsuite.pro +++ b/tests/auto/qscriptv8testsuite/qscriptv8testsuite.pro @@ -1,6 +1,7 @@ load(qttest_p4) QT = core script SOURCES += tst_qscriptv8testsuite.cpp +DEFINES += SRCDIR=\\\"$$PWD\\\" wince*: { testFiles.sources = tests diff --git a/tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp b/tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp index 77bfeb5..50eb19f 100644 --- a/tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp +++ b/tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp @@ -193,7 +193,7 @@ int tst_Suite::qt_metacall(QMetaObject::Call _c, int _id, void **_a) tst_Suite::tst_Suite() { - testsDir = QDir("."); + testsDir = QDir(SRCDIR); bool testsFound = testsDir.cd("tests"); if (!testsFound) { qWarning("*** no tests/ dir!"); diff --git a/tests/auto/qvariant/tst_qvariant.cpp b/tests/auto/qvariant/tst_qvariant.cpp index 0310276..63e47ab 100644 --- a/tests/auto/qvariant/tst_qvariant.cpp +++ b/tests/auto/qvariant/tst_qvariant.cpp @@ -255,6 +255,7 @@ private slots: void convertByteArrayToBool() const; void convertByteArrayToBool_data() const; void toIntFromQString() const; + void task256984_setValue(); }; Q_DECLARE_METATYPE(QDate) @@ -2967,5 +2968,21 @@ void tst_QVariant::toIntFromQString() const QVERIFY(ok); } +void tst_QVariant::task256984_setValue() +{ + QTransform t; //we just take a value so that we're sure that it will be shared + QVariant v1 = t; + QVERIFY( v1.isDetached() ); + QVariant v2 = v1; + QVERIFY( !v1.isDetached() ); + QVERIFY( !v2.isDetached() ); + + qVariantSetValue(v2, 3); //set an integer value + + QVERIFY( v1.isDetached() ); + QVERIFY( v2.isDetached() ); +} + + QTEST_MAIN(tst_QVariant) #include "tst_qvariant.moc" |