Commit 05060d5a authored by Pino Toscano's avatar Pino Toscano

tests: account for bitRate metadata

With newer versions of taglib (> 1.9 && < 1.11), also the bitRate
property for the sample MP3 file is extracted.
parent 166047f4
......@@ -51,9 +51,13 @@ void ExtractorTest::test()
QDataStream in(&bytearray, QIODevice::ReadOnly);
in >> data;
QCOMPARE(data.size(), 2);
QCOMPARE(data.value(QLatin1String("channels")).toInt(), 2);
QCOMPARE(data.value(QLatin1String("sampleRate")).toInt(), 44100);
if (data.size() == 3) {
QCOMPARE(data.value(QLatin1String("bitRate")).toInt(), 255000);
} else {
QCOMPARE(data.size(), 2);
}
}
QTEST_MAIN(ExtractorTest)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment