diff options
author | Michael Goddard <michael.goddard@nokia.com> | 2012-01-03 16:41:55 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-01-04 03:43:20 +0100 |
commit | f7fdfbe7defb45d8d21781b5e7d19691609c08a5 (patch) | |
tree | 9061cbdbc5a0714843eca8f1789e896c6bac2335 /tests/auto/unit | |
parent | d9dc92039377c41100f58119734883e5e6cb6dea (diff) | |
download | qtmultimedia-f7fdfbe7defb45d8d21781b5e7d19691609c08a5.tar.gz |
Remove a random instantiation of a backend.
Not appropriate for a unit test.
Change-Id: I7b05bb8aa067382b34e30d0602809c9fe56b27ef
Reviewed-by: Ling Hu <ling.hu@nokia.com>
Diffstat (limited to 'tests/auto/unit')
-rw-r--r-- | tests/auto/unit/qmediaplayer/tst_qmediaplayer.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/auto/unit/qmediaplayer/tst_qmediaplayer.cpp b/tests/auto/unit/qmediaplayer/tst_qmediaplayer.cpp index b902d3cfb..00d866edb 100644 --- a/tests/auto/unit/qmediaplayer/tst_qmediaplayer.cpp +++ b/tests/auto/unit/qmediaplayer/tst_qmediaplayer.cpp @@ -949,13 +949,15 @@ void tst_QMediaPlayer::testPlayerFlags() void tst_QMediaPlayer::testDestructor() { /* create an object for player */ - QMediaPlayer *player = new QMediaPlayer; + MockMediaPlayerService service; + MockMediaServiceProvider provider(&service); + QMediaPlayer *victim = new QMediaPlayer(0, 0, &provider); /* check whether the object is created */ - QVERIFY(player); + QVERIFY(victim); - /* delete the instance */ - delete player; + /* delete the instance (a crash is a failure :) */ + delete victim; } void tst_QMediaPlayer::testNetworkAccess() |