File indexing completed on 2024-04-28 04:48:58
0001 /* 0002 SPDX-FileCopyrightText: 2016 (c) Matthieu Gallien <matthieu_gallien@yahoo.fr> 0003 0004 SPDX-License-Identifier: LGPL-3.0-or-later 0005 */ 0006 0007 #ifndef MEDIAPLAYLISTTEST_H 0008 #define MEDIAPLAYLISTTEST_H 0009 0010 #include "databasetestdata.h" 0011 0012 #include <QObject> 0013 0014 class MediaPlayListTest : public QObject, public DatabaseTestData 0015 { 0016 0017 Q_OBJECT 0018 0019 public: 0020 0021 explicit MediaPlayListTest(QObject *parent = nullptr); 0022 0023 Q_SIGNALS: 0024 0025 private Q_SLOTS: 0026 0027 void initTestCase(); 0028 0029 void simpleInitialCase(); 0030 0031 void enqueueAlbumCase(); 0032 0033 void enqueueArtistCase(); 0034 0035 void enqueueTrackByUrl(); 0036 0037 void enqueueTracksByUrl(); 0038 0039 void enqueueFiles(); 0040 0041 void enqueueSampleFiles(); 0042 0043 void enqueueEmpty(); 0044 0045 void removeFirstTrackOfAlbum(); 0046 0047 void testTrackBeenRemoved(); 0048 0049 void testSetData(); 0050 0051 void testHasHeader(); 0052 0053 void testHasHeaderWithRemove(); 0054 0055 void testHasHeaderWithRestore(); 0056 0057 void testHasHeaderMoveFirst(); 0058 0059 void testHasHeaderMoveAnother(); 0060 0061 void restoreMultipleIdenticalTracks(); 0062 0063 void restoreTrackWithoutAlbum(); 0064 0065 void restoreLocalTrack(); 0066 0067 void testHasHeaderAlbumWithSameTitle(); 0068 0069 void testHasHeaderMoveFirstLikeQml(); 0070 0071 void testHasHeaderMoveAnotherLikeQml(); 0072 0073 void testHasHeaderYetAnotherMoveLikeQml(); 0074 0075 void crashOnEnqueue(); 0076 0077 }; 0078 0079 class MediaPlayList; 0080 0081 class CrashEnqueuePlayList : public QObject 0082 { 0083 Q_OBJECT 0084 0085 public: 0086 0087 explicit CrashEnqueuePlayList(MediaPlayList *list, QObject *parent = nullptr); 0088 0089 public Q_SLOTS: 0090 0091 void crashMediaPlayList(); 0092 0093 private: 0094 0095 MediaPlayList *mList = nullptr; 0096 }; 0097 0098 #endif // MEDIAPLAYLISTTEST_H