Changeset View
Changeset View
Standalone View
Standalone View
autotests/taglibwritertest.cpp
Show First 20 Lines • Show All 59 Lines • ▼ Show 20 Line(s) | 44 | { | |||
---|---|---|---|---|---|
60 | data.add(Property::TrackNumber, 10); | 60 | data.add(Property::TrackNumber, 10); | ||
61 | data.add(Property::ReleaseYear, 1999); | 61 | data.add(Property::ReleaseYear, 1999); | ||
62 | data.add(Property::Genre, QString(QStringLiteral("Genre1") + stringSuffix)); | 62 | data.add(Property::Genre, QString(QStringLiteral("Genre1") + stringSuffix)); | ||
63 | data.add(Property::Comment, QString(QStringLiteral("Comment1") + stringSuffix)); | 63 | data.add(Property::Comment, QString(QStringLiteral("Comment1") + stringSuffix)); | ||
64 | writerPlugin.write(data); | 64 | writerPlugin.write(data); | ||
65 | 65 | | |||
66 | KFileMetaData::ExtractorCollection extractors; | 66 | KFileMetaData::ExtractorCollection extractors; | ||
67 | QList<KFileMetaData::Extractor*> extractorList = extractors.fetchExtractors(mimeType); | 67 | QList<KFileMetaData::Extractor*> extractorList = extractors.fetchExtractors(mimeType); | ||
68 | if (extractorList.isEmpty()) | ||||
69 | QFAIL("This mime type is not supported by the extractor. Likely a newer KDE Frameworks version is required."); | ||||
68 | KFileMetaData::Extractor* ex = extractorList.first(); | 70 | KFileMetaData::Extractor* ex = extractorList.first(); | ||
69 | KFileMetaData::SimpleExtractionResult result(testFilePath(temporaryFileName), mimeType, | 71 | KFileMetaData::SimpleExtractionResult result(testFilePath(temporaryFileName), mimeType, | ||
70 | KFileMetaData::ExtractionResult::ExtractMetaData); | 72 | KFileMetaData::ExtractionResult::ExtractMetaData); | ||
71 | 73 | | |||
72 | ex->extract(&result); | 74 | ex->extract(&result); | ||
73 | QCOMPARE(result.properties().value(Property::Title), QVariant(QStringLiteral("Title1") + stringSuffix)); | 75 | QCOMPARE(result.properties().value(Property::Title), QVariant(QStringLiteral("Title1") + stringSuffix)); | ||
74 | QCOMPARE(result.properties().value(Property::Artist), QVariant(QStringLiteral("Artist1") + stringSuffix)); | 76 | QCOMPARE(result.properties().value(Property::Artist), QVariant(QStringLiteral("Artist1") + stringSuffix)); | ||
75 | QCOMPARE(result.properties().value(Property::Album), QVariant(QStringLiteral("Album1") + stringSuffix)); | 77 | QCOMPARE(result.properties().value(Property::Album), QVariant(QStringLiteral("Album1") + stringSuffix)); | ||
▲ Show 20 Lines • Show All 94 Lines • Show Last 20 Lines |