Oh, and there is a typo in jpeg test cover file.
It's actually cover_test.jpg instead of cover-test.jpg


S.B.

Le 25/05/2015 21:04, Sébastien Blaisot a écrit :

Ok, Got It.

on one hand :

const QString kCoverLocationTest("/src/test/id3-test-data/cover-test.jpg");
[...]
QImage img = QImage(kCoverLocationTest);

fails to load the image because of the absolute /src path

on the other hand :

info.coverLocation = "../../../" % kCoverLocationTest;
[...]
res = CoverArtCache::loadCover(info, NULL, 1234, 0, false);

Fails to load because of the broken relative path

and finally :

EXPECT_EQ(img, res.cover.image);

Succeeds because both are not loaded.
We are comparing the result of two failed actions, both are failed, test succeed.

I just created a pull request to correct the test. I think this will fail CI tests at least on windows as jpeg cover art are failing under windows.
https://github.com/mixxxdj/mixxx/pull/594

sb

Le 25/05/2015 18:14, Sébastien Blaisot a écrit :

Hi,

I think that cover art unit tests are not working as expected.

This line from coverartcache_test.cpp :
https://github.com/mixxxdj/mixxx/blob/master/src/test/coverartcache_test.cpp#L32

produces this output during test :
CoverArtUtils::loadCover FILE cover does not exist: "../../..//src/test/id3-test-data/cover-test.jpg" "/home/travis/build/mixxxdj/mixxx/src/test/id3-test-data/cover-test.mp3"

so loadCover is failing.

The test is actually succeeding, but I can't figure how it can succeed without a way to load the test data.

Another strange thing for me :
Last line of the test try to compare embedded cover art in mp3 file with content of the JPEG file.
but embedded cover in MP3 file is a PNG file.
How can this test succeed comparing a JPEG image with a PNG image ?
having the internal QImage format exactly similar after two different compression algorithms has been applied (PNG vs JPEG) seems nearly impossible.

What do you think of it ?

regards,

sb

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Get Mixxx, the #1 Free MP3 DJ Mixing software Today
http://mixxx.org


Mixxx-devel mailing list
Mixxx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mixxx-devel

Reply via email to