Changeset View
Changeset View
Standalone View
Standalone View
autotests/taglibextractortest.cpp
Show First 20 Lines • Show All 77 Lines • ▼ Show 20 Line(s) | 52 | { | |||
---|---|---|---|---|---|
78 | QCOMPARE(resultOpus.properties().value(Property::Copyright), QVariant(QStringLiteral("Copyright"))); | 78 | QCOMPARE(resultOpus.properties().value(Property::Copyright), QVariant(QStringLiteral("Copyright"))); | ||
79 | QCOMPARE(resultOpus.properties().value(Property::Compilation), QVariant(QStringLiteral("Compilation"))); | 79 | QCOMPARE(resultOpus.properties().value(Property::Compilation), QVariant(QStringLiteral("Compilation"))); | ||
80 | QCOMPARE(resultOpus.properties().value(Property::License), QVariant(QStringLiteral("License"))); | 80 | QCOMPARE(resultOpus.properties().value(Property::License), QVariant(QStringLiteral("License"))); | ||
81 | QCOMPARE(resultOpus.properties().value(Property::Opus).toInt(), 1); | 81 | QCOMPARE(resultOpus.properties().value(Property::Opus).toInt(), 1); | ||
82 | QCOMPARE(resultOpus.properties().value(Property::TrackNumber).toInt(), 1); | 82 | QCOMPARE(resultOpus.properties().value(Property::TrackNumber).toInt(), 1); | ||
83 | QCOMPARE(resultOpus.properties().value(Property::ReleaseYear).toInt(), 2015); | 83 | QCOMPARE(resultOpus.properties().value(Property::ReleaseYear).toInt(), 2015); | ||
84 | QCOMPARE(resultOpus.properties().value(Property::Channels).toInt(), 1); | 84 | QCOMPARE(resultOpus.properties().value(Property::Channels).toInt(), 1); | ||
85 | QCOMPARE(resultOpus.properties().value(Property::DiscNumber).toInt(), 1); | 85 | QCOMPARE(resultOpus.properties().value(Property::DiscNumber).toInt(), 1); | ||
86 | QCOMPARE(resultOpus.properties().value(Property::Rating).toInt(), 1); | ||||
86 | } | 87 | } | ||
87 | 88 | | |||
88 | void TagLibExtractorTest::testFlac() | 89 | void TagLibExtractorTest::testFlac() | ||
89 | { | 90 | { | ||
90 | TagLibExtractor plugin{this}; | 91 | TagLibExtractor plugin{this}; | ||
91 | | ||||
92 | SimpleExtractionResult resultFlac(testFilePath("test.flac"), "audio/flac"); | 92 | SimpleExtractionResult resultFlac(testFilePath("test.flac"), "audio/flac"); | ||
93 | plugin.extract(&resultFlac); | 93 | plugin.extract(&resultFlac); | ||
94 | 94 | | |||
95 | QCOMPARE(resultFlac.types().size(), 1); | 95 | QCOMPARE(resultFlac.types().size(), 1); | ||
96 | QCOMPARE(resultFlac.types().constFirst(), Type::Audio); | 96 | QCOMPARE(resultFlac.types().constFirst(), Type::Audio); | ||
97 | 97 | | |||
98 | QCOMPARE(resultFlac.properties().value(Property::Title), QVariant(QStringLiteral("Title"))); | 98 | QCOMPARE(resultFlac.properties().value(Property::Title), QVariant(QStringLiteral("Title"))); | ||
99 | QCOMPARE(resultFlac.properties().value(Property::Artist), QVariant(QStringLiteral("Artist"))); | 99 | QCOMPARE(resultFlac.properties().value(Property::Artist), QVariant(QStringLiteral("Artist"))); | ||
Show All 15 Lines | |||||
115 | QCOMPARE(resultFlac.properties().value(Property::Copyright), QVariant(QStringLiteral("Copyright"))); | 115 | QCOMPARE(resultFlac.properties().value(Property::Copyright), QVariant(QStringLiteral("Copyright"))); | ||
116 | QCOMPARE(resultFlac.properties().value(Property::Compilation), QVariant(QStringLiteral("Compilation"))); | 116 | QCOMPARE(resultFlac.properties().value(Property::Compilation), QVariant(QStringLiteral("Compilation"))); | ||
117 | QCOMPARE(resultFlac.properties().value(Property::License), QVariant(QStringLiteral("License"))); | 117 | QCOMPARE(resultFlac.properties().value(Property::License), QVariant(QStringLiteral("License"))); | ||
118 | QCOMPARE(resultFlac.properties().value(Property::Opus).toInt(), 1); | 118 | QCOMPARE(resultFlac.properties().value(Property::Opus).toInt(), 1); | ||
119 | QCOMPARE(resultFlac.properties().value(Property::TrackNumber).toInt(), 1); | 119 | QCOMPARE(resultFlac.properties().value(Property::TrackNumber).toInt(), 1); | ||
120 | QCOMPARE(resultFlac.properties().value(Property::ReleaseYear).toInt(), 2015); | 120 | QCOMPARE(resultFlac.properties().value(Property::ReleaseYear).toInt(), 2015); | ||
121 | QCOMPARE(resultFlac.properties().value(Property::Channels).toInt(), 1); | 121 | QCOMPARE(resultFlac.properties().value(Property::Channels).toInt(), 1); | ||
122 | QCOMPARE(resultFlac.properties().value(Property::DiscNumber).toInt(), 1); | 122 | QCOMPARE(resultFlac.properties().value(Property::DiscNumber).toInt(), 1); | ||
123 | QCOMPARE(resultFlac.properties().value(Property::Rating).toInt(), 10); | ||||
123 | } | 124 | } | ||
124 | 125 | | |||
125 | void TagLibExtractorTest::testOgg() | 126 | void TagLibExtractorTest::testOgg() | ||
126 | { | 127 | { | ||
127 | TagLibExtractor plugin{this}; | 128 | TagLibExtractor plugin{this}; | ||
128 | | ||||
129 | SimpleExtractionResult resultOgg(testFilePath("test.ogg"), "audio/ogg"); | 129 | SimpleExtractionResult resultOgg(testFilePath("test.ogg"), "audio/ogg"); | ||
130 | plugin.extract(&resultOgg); | 130 | plugin.extract(&resultOgg); | ||
131 | 131 | | |||
132 | QCOMPARE(resultOgg.types().size(), 1); | 132 | QCOMPARE(resultOgg.types().size(), 1); | ||
133 | QCOMPARE(resultOgg.types().constFirst(), Type::Audio); | 133 | QCOMPARE(resultOgg.types().constFirst(), Type::Audio); | ||
134 | 134 | | |||
135 | QCOMPARE(resultOgg.properties().value(Property::Title), QVariant(QStringLiteral("Title"))); | 135 | QCOMPARE(resultOgg.properties().value(Property::Title), QVariant(QStringLiteral("Title"))); | ||
136 | QCOMPARE(resultOgg.properties().value(Property::Artist), QVariant(QStringLiteral("Artist"))); | 136 | QCOMPARE(resultOgg.properties().value(Property::Artist), QVariant(QStringLiteral("Artist"))); | ||
Show All 15 Lines | |||||
152 | QCOMPARE(resultOgg.properties().value(Property::Copyright), QVariant(QStringLiteral("Copyright"))); | 152 | QCOMPARE(resultOgg.properties().value(Property::Copyright), QVariant(QStringLiteral("Copyright"))); | ||
153 | QCOMPARE(resultOgg.properties().value(Property::Compilation), QVariant(QStringLiteral("Compilation"))); | 153 | QCOMPARE(resultOgg.properties().value(Property::Compilation), QVariant(QStringLiteral("Compilation"))); | ||
154 | QCOMPARE(resultOgg.properties().value(Property::License), QVariant(QStringLiteral("License"))); | 154 | QCOMPARE(resultOgg.properties().value(Property::License), QVariant(QStringLiteral("License"))); | ||
155 | QCOMPARE(resultOgg.properties().value(Property::Opus).toInt(), 1); | 155 | QCOMPARE(resultOgg.properties().value(Property::Opus).toInt(), 1); | ||
156 | QCOMPARE(resultOgg.properties().value(Property::TrackNumber).toInt(), 1); | 156 | QCOMPARE(resultOgg.properties().value(Property::TrackNumber).toInt(), 1); | ||
157 | QCOMPARE(resultOgg.properties().value(Property::ReleaseYear).toInt(), 2015); | 157 | QCOMPARE(resultOgg.properties().value(Property::ReleaseYear).toInt(), 2015); | ||
158 | QCOMPARE(resultOgg.properties().value(Property::Channels).toInt(), 1); | 158 | QCOMPARE(resultOgg.properties().value(Property::Channels).toInt(), 1); | ||
159 | QCOMPARE(resultOgg.properties().value(Property::DiscNumber).toInt(), 1); | 159 | QCOMPARE(resultOgg.properties().value(Property::DiscNumber).toInt(), 1); | ||
160 | QCOMPARE(resultOgg.properties().value(Property::Rating).toInt(), 5); | ||||
160 | } | 161 | } | ||
161 | 162 | | |||
162 | void TagLibExtractorTest::testMp3() | 163 | void TagLibExtractorTest::testMp3() | ||
163 | { | 164 | { | ||
164 | TagLibExtractor plugin{this}; | 165 | TagLibExtractor plugin{this}; | ||
165 | | ||||
166 | SimpleExtractionResult resultMp3(testFilePath("test.mp3"), "audio/mpeg"); | 166 | SimpleExtractionResult resultMp3(testFilePath("test.mp3"), "audio/mpeg"); | ||
167 | plugin.extract(&resultMp3); | 167 | plugin.extract(&resultMp3); | ||
168 | 168 | | |||
169 | QCOMPARE(resultMp3.types().size(), 1); | 169 | QCOMPARE(resultMp3.types().size(), 1); | ||
170 | QCOMPARE(resultMp3.types().constFirst(), Type::Audio); | 170 | QCOMPARE(resultMp3.types().constFirst(), Type::Audio); | ||
171 | | ||||
172 | QCOMPARE(resultMp3.properties().value(Property::Title), QVariant(QStringLiteral("Title"))); | 171 | QCOMPARE(resultMp3.properties().value(Property::Title), QVariant(QStringLiteral("Title"))); | ||
173 | QCOMPARE(resultMp3.properties().value(Property::Artist), QVariant(QStringLiteral("Artist"))); | 172 | QCOMPARE(resultMp3.properties().value(Property::Artist), QVariant(QStringLiteral("Artist"))); | ||
174 | QCOMPARE(resultMp3.properties().value(Property::Album), QVariant(QStringLiteral("Album"))); | 173 | QCOMPARE(resultMp3.properties().value(Property::Album), QVariant(QStringLiteral("Album"))); | ||
175 | QCOMPARE(resultMp3.properties().value(Property::AlbumArtist), QVariant(QStringLiteral("Album Artist"))); | 174 | QCOMPARE(resultMp3.properties().value(Property::AlbumArtist), QVariant(QStringLiteral("Album Artist"))); | ||
176 | QCOMPARE(resultMp3.properties().value(Property::Genre), QVariant(QStringLiteral("Genre"))); | 175 | QCOMPARE(resultMp3.properties().value(Property::Genre), QVariant(QStringLiteral("Genre"))); | ||
177 | QCOMPARE(resultMp3.properties().value(Property::Comment), QVariant(QStringLiteral("Comment"))); | 176 | QCOMPARE(resultMp3.properties().value(Property::Comment), QVariant(QStringLiteral("Comment"))); | ||
178 | QCOMPARE(resultMp3.properties().value(Property::Composer), QVariant(QStringLiteral("Composer"))); | 177 | QCOMPARE(resultMp3.properties().value(Property::Composer), QVariant(QStringLiteral("Composer"))); | ||
179 | QCOMPARE(resultMp3.properties().value(Property::Lyricist), QVariant(QStringLiteral("Lyricist"))); | 178 | QCOMPARE(resultMp3.properties().value(Property::Lyricist), QVariant(QStringLiteral("Lyricist"))); | ||
180 | QCOMPARE(resultMp3.properties().value(Property::Conductor), QVariant(QStringLiteral("Conductor"))); | 179 | QCOMPARE(resultMp3.properties().value(Property::Conductor), QVariant(QStringLiteral("Conductor"))); | ||
181 | QCOMPARE(resultMp3.properties().value(Property::Publisher), QVariant(QStringLiteral("Publisher"))); | 180 | QCOMPARE(resultMp3.properties().value(Property::Publisher), QVariant(QStringLiteral("Publisher"))); | ||
182 | QCOMPARE(resultMp3.properties().value(Property::Langauge), QVariant(QStringLiteral("Language"))); | 181 | QCOMPARE(resultMp3.properties().value(Property::Langauge), QVariant(QStringLiteral("Language"))); | ||
183 | QCOMPARE(resultMp3.properties().value(Property::Compilation), QVariant(QStringLiteral("Compilation"))); | 182 | QCOMPARE(resultMp3.properties().value(Property::Compilation), QVariant(QStringLiteral("Compilation"))); | ||
184 | QCOMPARE(resultMp3.properties().value(Property::TrackNumber).toInt(), 1); | 183 | QCOMPARE(resultMp3.properties().value(Property::TrackNumber).toInt(), 1); | ||
185 | QCOMPARE(resultMp3.properties().value(Property::ReleaseYear).toInt(), 2015); | 184 | QCOMPARE(resultMp3.properties().value(Property::ReleaseYear).toInt(), 2015); | ||
186 | QCOMPARE(resultMp3.properties().value(Property::Channels).toInt(), 1); | 185 | QCOMPARE(resultMp3.properties().value(Property::Channels).toInt(), 1); | ||
187 | QCOMPARE(resultMp3.properties().value(Property::DiscNumber).toInt(), 1); | 186 | QCOMPARE(resultMp3.properties().value(Property::DiscNumber).toInt(), 1); | ||
187 | QCOMPARE(resultMp3.properties().value(Property::Rating).toInt(), 10); | ||||
188 | } | 188 | } | ||
189 | 189 | | |||
190 | void TagLibExtractorTest::testMpc() | 190 | void TagLibExtractorTest::testMpc() | ||
191 | { | 191 | { | ||
192 | TagLibExtractor plugin{this}; | 192 | TagLibExtractor plugin{this}; | ||
193 | | ||||
194 | SimpleExtractionResult resultMpc(testFilePath("test.mpc"), "audio/x-musepack"); | 193 | SimpleExtractionResult resultMpc(testFilePath("test.mpc"), "audio/x-musepack"); | ||
195 | plugin.extract(&resultMpc); | 194 | plugin.extract(&resultMpc); | ||
196 | 195 | | |||
197 | QCOMPARE(resultMpc.types().size(), 1); | 196 | QCOMPARE(resultMpc.types().size(), 1); | ||
198 | QCOMPARE(resultMpc.types().constFirst(), Type::Audio); | 197 | QCOMPARE(resultMpc.types().constFirst(), Type::Audio); | ||
199 | 198 | | |||
200 | QCOMPARE(resultMpc.properties().value(Property::Title), QVariant(QStringLiteral("Title"))); | 199 | QCOMPARE(resultMpc.properties().value(Property::Title), QVariant(QStringLiteral("Title"))); | ||
201 | QCOMPARE(resultMpc.properties().value(Property::Artist), QVariant(QStringLiteral("Artist"))); | 200 | QCOMPARE(resultMpc.properties().value(Property::Artist), QVariant(QStringLiteral("Artist"))); | ||
Show All 13 Lines | |||||
215 | QCOMPARE(resultMpc.properties().value(Property::Author), QVariant(QStringLiteral("Author"))); | 214 | QCOMPARE(resultMpc.properties().value(Property::Author), QVariant(QStringLiteral("Author"))); | ||
216 | QCOMPARE(resultMpc.properties().value(Property::Copyright), QVariant(QStringLiteral("Copyright"))); | 215 | QCOMPARE(resultMpc.properties().value(Property::Copyright), QVariant(QStringLiteral("Copyright"))); | ||
217 | QCOMPARE(resultMpc.properties().value(Property::Compilation), QVariant(QStringLiteral("Compilation"))); | 216 | QCOMPARE(resultMpc.properties().value(Property::Compilation), QVariant(QStringLiteral("Compilation"))); | ||
218 | QCOMPARE(resultMpc.properties().value(Property::License), QVariant(QStringLiteral("License"))); | 217 | QCOMPARE(resultMpc.properties().value(Property::License), QVariant(QStringLiteral("License"))); | ||
219 | QCOMPARE(resultMpc.properties().value(Property::TrackNumber).toInt(), 1); | 218 | QCOMPARE(resultMpc.properties().value(Property::TrackNumber).toInt(), 1); | ||
220 | QCOMPARE(resultMpc.properties().value(Property::ReleaseYear).toInt(), 2015); | 219 | QCOMPARE(resultMpc.properties().value(Property::ReleaseYear).toInt(), 2015); | ||
221 | QCOMPARE(resultMpc.properties().value(Property::Channels).toInt(), 1); | 220 | QCOMPARE(resultMpc.properties().value(Property::Channels).toInt(), 1); | ||
222 | QCOMPARE(resultMpc.properties().value(Property::DiscNumber).isValid(), false); | 221 | QCOMPARE(resultMpc.properties().value(Property::DiscNumber).isValid(), false); | ||
222 | QCOMPARE(resultMpc.properties().value(Property::Rating).toInt(), 4); | ||||
223 | } | 223 | } | ||
224 | 224 | | |||
225 | void TagLibExtractorTest::testMp4() | 225 | void TagLibExtractorTest::testMp4() | ||
226 | { | 226 | { | ||
227 | TagLibExtractor plugin{this}; | 227 | TagLibExtractor plugin{this}; | ||
228 | | ||||
229 | SimpleExtractionResult resultMp4(testFilePath("test.m4a"), "audio/mp4"); | 228 | SimpleExtractionResult resultMp4(testFilePath("test.m4a"), "audio/mp4"); | ||
230 | plugin.extract(&resultMp4); | 229 | plugin.extract(&resultMp4); | ||
231 | 230 | | |||
232 | QCOMPARE(resultMp4.types().size(), 1); | 231 | QCOMPARE(resultMp4.types().size(), 1); | ||
233 | QCOMPARE(resultMp4.types().constFirst(), Type::Audio); | 232 | QCOMPARE(resultMp4.types().constFirst(), Type::Audio); | ||
234 | 233 | | |||
235 | QCOMPARE(resultMp4.properties().value(Property::Title), QVariant(QStringLiteral("Title"))); | 234 | QCOMPARE(resultMp4.properties().value(Property::Title), QVariant(QStringLiteral("Title"))); | ||
236 | QCOMPARE(resultMp4.properties().value(Property::Artist), QVariant(QStringLiteral("Artist"))); | 235 | QCOMPARE(resultMp4.properties().value(Property::Artist), QVariant(QStringLiteral("Artist"))); | ||
237 | QCOMPARE(resultMp4.properties().value(Property::Album), QVariant(QStringLiteral("Album"))); | 236 | QCOMPARE(resultMp4.properties().value(Property::Album), QVariant(QStringLiteral("Album"))); | ||
238 | QCOMPARE(resultMp4.properties().value(Property::AlbumArtist), QVariant(QStringLiteral("Album Artist"))); | 237 | QCOMPARE(resultMp4.properties().value(Property::AlbumArtist), QVariant(QStringLiteral("Album Artist"))); | ||
239 | QCOMPARE(resultMp4.properties().value(Property::Genre), QVariant(QStringLiteral("Genre"))); | 238 | QCOMPARE(resultMp4.properties().value(Property::Genre), QVariant(QStringLiteral("Genre"))); | ||
240 | QCOMPARE(resultMp4.properties().value(Property::Comment), QVariant(QStringLiteral("Comment"))); | 239 | QCOMPARE(resultMp4.properties().value(Property::Comment), QVariant(QStringLiteral("Comment"))); | ||
241 | QCOMPARE(resultMp4.properties().value(Property::Composer), QVariant(QStringLiteral("Composer"))); | 240 | QCOMPARE(resultMp4.properties().value(Property::Composer), QVariant(QStringLiteral("Composer"))); | ||
242 | QCOMPARE(resultMp4.properties().value(Property::Copyright), QVariant(QStringLiteral("Copyright"))); | 241 | QCOMPARE(resultMp4.properties().value(Property::Copyright), QVariant(QStringLiteral("Copyright"))); | ||
243 | QCOMPARE(resultMp4.properties().value(Property::TrackNumber).toInt(), 1); | 242 | QCOMPARE(resultMp4.properties().value(Property::TrackNumber).toInt(), 1); | ||
244 | QCOMPARE(resultMp4.properties().value(Property::ReleaseYear).toInt(), 2015); | 243 | QCOMPARE(resultMp4.properties().value(Property::ReleaseYear).toInt(), 2015); | ||
245 | QCOMPARE(resultMp4.properties().value(Property::Channels).toInt(), 2); | 244 | QCOMPARE(resultMp4.properties().value(Property::Channels).toInt(), 2); | ||
246 | QCOMPARE(resultMp4.properties().value(Property::DiscNumber).toInt(), 1); | 245 | QCOMPARE(resultMp4.properties().value(Property::DiscNumber).toInt(), 1); | ||
246 | QCOMPARE(resultMp4.properties().value(Property::Rating).toInt(), 8); | ||||
247 | } | ||||
248 | | ||||
249 | void TagLibExtractorTest::testMP3Rating_data() | ||||
250 | { | ||||
251 | QTest::addColumn<QString>("path"); | ||||
252 | QTest::addColumn<int>("expectedRating"); | ||||
253 | | ||||
254 | QTest::addRow("WMP") | ||||
255 | << QFINDTESTDATA("samplefiles/mp3_rating/testWMP.mp3") | ||||
256 | << 0 ; | ||||
257 | QTest::addRow("WMP1") | ||||
258 | << QFINDTESTDATA("samplefiles/mp3_rating/testWMP1.mp3") | ||||
259 | << 2 ; | ||||
260 | QTest::addRow("WMP2") | ||||
261 | << QFINDTESTDATA("samplefiles/mp3_rating/testWMP2.mp3") | ||||
262 | << 4 ; | ||||
263 | QTest::addRow("WMP3") | ||||
264 | << QFINDTESTDATA("samplefiles/mp3_rating/testWMP3.mp3") | ||||
265 | << 6 ; | ||||
266 | QTest::addRow("WMP4") | ||||
267 | << QFINDTESTDATA("samplefiles/mp3_rating/testWMP4.mp3") | ||||
268 | << 8 ; | ||||
269 | QTest::addRow("WMP5") | ||||
270 | << QFINDTESTDATA("samplefiles/mp3_rating/testWMP5.mp3") | ||||
271 | << 10 ; | ||||
272 | QTest::addRow("MM") | ||||
273 | << QFINDTESTDATA("samplefiles/mp3_rating/testMM.mp3") | ||||
274 | << 0 ; | ||||
275 | QTest::addRow("MM1") | ||||
276 | << QFINDTESTDATA("samplefiles/mp3_rating/testMM1.mp3") | ||||
277 | << 1 ; | ||||
278 | QTest::addRow("MM2") | ||||
279 | << QFINDTESTDATA("samplefiles/mp3_rating/testMM2.mp3") | ||||
280 | << 2 ; | ||||
281 | QTest::addRow("MM3") | ||||
282 | << QFINDTESTDATA("samplefiles/mp3_rating/testMM3.mp3") | ||||
283 | << 3 ; | ||||
284 | QTest::addRow("MM4") | ||||
285 | << QFINDTESTDATA("samplefiles/mp3_rating/testMM4.mp3") | ||||
286 | << 4 ; | ||||
287 | QTest::addRow("MM5") | ||||
288 | << QFINDTESTDATA("samplefiles/mp3_rating/testMM5.mp3") | ||||
289 | << 5 ; | ||||
290 | QTest::addRow("MM6") | ||||
291 | << QFINDTESTDATA("samplefiles/mp3_rating/testMM6.mp3") | ||||
292 | << 6 ; | ||||
293 | QTest::addRow("MM7") | ||||
294 | << QFINDTESTDATA("samplefiles/mp3_rating/testMM7.mp3") | ||||
295 | << 7 ; | ||||
296 | QTest::addRow("MM8") | ||||
297 | << QFINDTESTDATA("samplefiles/mp3_rating/testMM8.mp3") | ||||
298 | << 8 ; | ||||
299 | QTest::addRow("MM9") | ||||
300 | << QFINDTESTDATA("samplefiles/mp3_rating/testMM9.mp3") | ||||
301 | << 9 ; | ||||
302 | QTest::addRow("MM10") | ||||
303 | << QFINDTESTDATA("samplefiles/mp3_rating/testMM10.mp3") | ||||
304 | << 10 ; | ||||
305 | } | ||||
306 | | ||||
307 | void TagLibExtractorTest::testMP3Rating() | ||||
308 | { | ||||
309 | QFETCH(QString, path); | ||||
310 | QFETCH(int, expectedRating); | ||||
311 | | ||||
312 | TagLibExtractor plugin{this}; | ||||
313 | SimpleExtractionResult resultMp3(path, "audio/mpeg"); | ||||
314 | plugin.extract(&resultMp3); | ||||
315 | | ||||
316 | QCOMPARE(resultMp3.properties().value(Property::Rating).toInt(), expectedRating); | ||||
247 | } | 317 | } | ||
248 | 318 | | |||
249 | void TagLibExtractorTest::testNoMetadata_data() | 319 | void TagLibExtractorTest::testNoMetadata_data() | ||
250 | { | 320 | { | ||
251 | const auto expectedKeys = QList<Property::Property>{ | 321 | const auto expectedKeys = QList<Property::Property>{ | ||
252 | Property::BitRate, | 322 | Property::BitRate, | ||
253 | Property::Channels, | 323 | Property::Channels, | ||
254 | Property::Duration, | 324 | Property::Duration, | ||
▲ Show 20 Lines • Show All 87 Lines • Show Last 20 Lines |