diff options
author | Rohan McGovern <rohan.mcgovern@nokia.com> | 2011-11-24 10:36:10 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-12-01 09:12:52 +0100 |
commit | 3385fb91e1e55e1bfa1f78dfb8ce2e9f3fdaedef (patch) | |
tree | b77bb527bf3a21dc95a317248b2640c73751f629 /tests/auto/corelib/plugin/quuid/tst_quuid.cpp | |
parent | 13eba9ddf47d570fc4562c20fcfbacd1dfa4a61a (diff) | |
download | qtbase-3385fb91e1e55e1bfa1f78dfb8ce2e9f3fdaedef.tar.gz |
Fixed installation of corelib tests
In .pro files, removed wince/symbian-specific DEPLOYMENT cases and
replaced them with TESTDATA where appropriate.
In .cpp files, removed SRCDIR and relative paths to testdata and
replaced them with the QFINDTESTDATA macro where appropriate.
Modified test helper apps/libs to install themselves under the test
they relate to.
This change allows corelib tests to be correctly installed, along with
their testdata, via `make install'.
Change-Id: I5e202e2f3b577af7e39072d5c9fe13e0ca125304
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Diffstat (limited to 'tests/auto/corelib/plugin/quuid/tst_quuid.cpp')
-rw-r--r-- | tests/auto/corelib/plugin/quuid/tst_quuid.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/auto/corelib/plugin/quuid/tst_quuid.cpp b/tests/auto/corelib/plugin/quuid/tst_quuid.cpp index 5761ea1a8c..fc0f923427 100644 --- a/tests/auto/corelib/plugin/quuid/tst_quuid.cpp +++ b/tests/auto/corelib/plugin/quuid/tst_quuid.cpp @@ -56,10 +56,9 @@ class tst_QUuid : public QObject { Q_OBJECT -public: - tst_QUuid(); - private slots: + void initTestCase(); + void fromChar(); void toString(); void fromString(); @@ -90,13 +89,17 @@ public: QUuid uuidB; }; -tst_QUuid::tst_QUuid() +void tst_QUuid::initTestCase() { //"{fc69b59e-cc34-4436-a43c-ee95d128b8c5}"; uuidA = QUuid(0xfc69b59e, 0xcc34 ,0x4436 ,0xa4 ,0x3c ,0xee ,0x95 ,0xd1 ,0x28 ,0xb8 ,0xc5); //"{1ab6e93a-b1cb-4a87-ba47-ec7e99039a7b}"; uuidB = QUuid(0x1ab6e93a ,0xb1cb ,0x4a87 ,0xba ,0x47 ,0xec ,0x7e ,0x99 ,0x03 ,0x9a ,0x7b); + + // chdir to the directory containing our testdata, then refer to it with relative paths + QString testdata_dir = QFileInfo(QFINDTESTDATA("testProcessUniqueness")).absolutePath(); + QVERIFY2(QDir::setCurrent(testdata_dir), qPrintable("Could not chdir to " + testdata_dir)); } void tst_QUuid::fromChar() |