diff options
author | Andrew den Exter <andrew.den-exter@nokia.com> | 2010-02-17 02:41:11 (GMT) |
---|---|---|
committer | Andrew den Exter <andrew.den-exter@nokia.com> | 2010-02-17 02:49:42 (GMT) |
commit | a2aaed149cffdde161fc1fc7d718b3fd7f6c96c5 (patch) | |
tree | 34f2c866f13ff902971537c8bc477ca50d827d45 /tests/auto/qmediaplayer | |
parent | 4cbeafe5be5f7d20525518fa9c9686fd68869171 (diff) | |
download | Qt-a2aaed149cffdde161fc1fc7d718b3fd7f6c96c5.zip Qt-a2aaed149cffdde161fc1fc7d718b3fd7f6c96c5.tar.gz Qt-a2aaed149cffdde161fc1fc7d718b3fd7f6c96c5.tar.bz2 |
Fix QMediaPlayer test failure.
Prepending the Qt namespace with QT_PREPEND_NAMESPACE in a
Q_DECLARE_METATYPE statement is unecessary and appears not to work with
signal declarations in QSignalSpy.
Diffstat (limited to 'tests/auto/qmediaplayer')
-rw-r--r-- | tests/auto/qmediaplayer/tst_qmediaplayer.cpp | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/tests/auto/qmediaplayer/tst_qmediaplayer.cpp b/tests/auto/qmediaplayer/tst_qmediaplayer.cpp index 1775ec6..a96e08d 100644 --- a/tests/auto/qmediaplayer/tst_qmediaplayer.cpp +++ b/tests/auto/qmediaplayer/tst_qmediaplayer.cpp @@ -304,10 +304,7 @@ void tst_QMediaPlayer::initTestCase_data() void tst_QMediaPlayer::initTestCase() { - qRegisterMetaType<QMediaPlayer::State>("QMediaPlayer::State"); - qRegisterMetaType<QMediaPlayer::Error>("QMediaPlayer::Error"); - qRegisterMetaType<QMediaPlayer::MediaStatus>("QMediaPlayer::MediaStatus"); - qRegisterMetaType<QMediaContent>("QMediaContent"); + qRegisterMetaType<QMediaContent>(); mockService = new MockPlayerService; mockProvider = new MockProvider(mockService); @@ -738,10 +735,6 @@ void tst_QMediaPlayer::testMediaStatus() QCOMPARE(player->mediaStatus(), QMediaPlayer::LoadingMedia); QCOMPARE(statusSpy.count(), 1); -#ifdef QTM_NAMESPACE - //looks like the correct value is emited, but QSignalSpy doesn't work correctly with QtMobility namespace - QEXPECT_FAIL("", "QSignalSpy doesn't grab the correct value from signal because of QtMobility namespace", Continue); -#endif QCOMPARE(qvariant_cast<QMediaPlayer::MediaStatus>(statusSpy.last().value(0)), QMediaPlayer::LoadingMedia); @@ -749,10 +742,6 @@ void tst_QMediaPlayer::testMediaStatus() QCOMPARE(player->mediaStatus(), QMediaPlayer::LoadedMedia); QCOMPARE(statusSpy.count(), 2); -#ifdef QTM_NAMESPACE - //looks like the correct value is emited, but QSignalSpy doesn't work correctly with QtMobility namespace - QEXPECT_FAIL("", "QSignalSpy doesn't grab the correct value from signal because of QtMobility namespace", Continue); -#endif QCOMPARE(qvariant_cast<QMediaPlayer::MediaStatus>(statusSpy.last().value(0)), QMediaPlayer::LoadedMedia); @@ -764,10 +753,6 @@ void tst_QMediaPlayer::testMediaStatus() QCOMPARE(player->mediaStatus(), QMediaPlayer::StalledMedia); QCOMPARE(statusSpy.count(), 3); -#ifdef QTM_NAMESPACE - //looks like the correct value is emited, but QSignalSpy doesn't work correctly with QtMobility namespace - QEXPECT_FAIL("", "QSignalSpy doesn't grab the correct value from signal because of QtMobility namespace", Continue); -#endif QCOMPARE(qvariant_cast<QMediaPlayer::MediaStatus>(statusSpy.last().value(0)), QMediaPlayer::StalledMedia); @@ -781,10 +766,6 @@ void tst_QMediaPlayer::testMediaStatus() QCOMPARE(player->mediaStatus(), QMediaPlayer::BufferingMedia); QCOMPARE(statusSpy.count(), 4); -#ifdef QTM_NAMESPACE - //looks like the correct value is emited, but QSignalSpy doesn't work correctly with QtMobility namespace - QEXPECT_FAIL("", "QSignalSpy doesn't grab the correct value from signal because of QtMobility namespace", Continue); -#endif QCOMPARE(qvariant_cast<QMediaPlayer::MediaStatus>(statusSpy.last().value(0)), QMediaPlayer::BufferingMedia); @@ -798,10 +779,6 @@ void tst_QMediaPlayer::testMediaStatus() QCOMPARE(player->mediaStatus(), QMediaPlayer::BufferedMedia); QCOMPARE(statusSpy.count(), 5); -#ifdef QTM_NAMESPACE - //looks like the correct value is emited, but QSignalSpy doesn't work correctly with QtMobility namespace - QEXPECT_FAIL("", "QSignalSpy doesn't grab the correct value from signal because of QtMobility namespace", Continue); -#endif QCOMPARE(qvariant_cast<QMediaPlayer::MediaStatus>(statusSpy.last().value(0)), QMediaPlayer::BufferedMedia); @@ -813,10 +790,6 @@ void tst_QMediaPlayer::testMediaStatus() QCOMPARE(player->mediaStatus(), QMediaPlayer::EndOfMedia); QCOMPARE(statusSpy.count(), 6); -#ifdef QTM_NAMESPACE - //looks like the correct value is emited, but QSignalSpy doesn't work correctly with QtMobility namespace - QEXPECT_FAIL("", "QSignalSpy doesn't grab the correct value from signal because of QtMobility namespace", Continue); -#endif QCOMPARE(qvariant_cast<QMediaPlayer::MediaStatus>(statusSpy.last().value(0)), QMediaPlayer::EndOfMedia); } |