From 8d7015021c49498d10812ef0b26b59b146c9db3d Mon Sep 17 00:00:00 2001 From: Jens Georg Date: Sat, 14 Jun 2014 23:21:34 +0200 Subject: test: Remove album art spec test Signed-off-by: Jens Georg --- tests/Makefile.am | 12 ---- tests/rygel-album-art-spec-test.vala | 130 ----------------------------------- tests/rygel-media-art-store.vala | 1 - 3 files changed, 143 deletions(-) delete mode 100644 tests/rygel-album-art-spec-test.vala delete mode 120000 tests/rygel-media-art-store.vala (limited to 'tests') diff --git a/tests/Makefile.am b/tests/Makefile.am index 38070c2d..5e20e8c4 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -5,7 +5,6 @@ check_PROGRAMS = rygel-http-item-uri-test \ rygel-http-byte-seek-test \ rygel-http-time-seek-test \ rygel-http-get-test \ - rygel-album-art-spec-test \ rygel-http-post-test \ rygel-searchable-container-test \ rygel-object-creator-test \ @@ -113,17 +112,6 @@ rygel_http_post_test_CFLAGS = \ rygel_http_post_test_LDADD = \ $(test_libs) -rygel_album_art_spec_test_SOURCES = rygel-album-art-spec-test.vala \ - rygel-media-art-store.vala \ - rygel-thumbnail.vala \ - rygel-icon-info.vala -rygel_album_art_spec_test_VALAFLAGS = $(test_valaflags) \ - --pkg gupnp-av-1.0 -rygel_album_art_spec_test_CFLAGS = \ - $(test_cflags) -rygel_album_art_spec_test_LDADD = \ - $(test_libs) - rygel_searchable_container_test_SOURCES = \ rygel-searchable-container.vala \ rygel-searchable-container-test.vala diff --git a/tests/rygel-album-art-spec-test.vala b/tests/rygel-album-art-spec-test.vala deleted file mode 100644 index a78e24fc..00000000 --- a/tests/rygel-album-art-spec-test.vala +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Copyright (C) 2010 Jens Georg. - * - * Author: Jens Georg - * - * This file is part of Rygel. - * - * Rygel is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * Rygel is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -public abstract class Rygel.MediaItem : GLib.Object { - public string title; -} - -public class Rygel.AudioItem : MediaItem {} - -public class Rygel.MusicItem : AudioItem { - public string artist; - public string album; -} - -private class Rygel.AlbumArtSpecTest : GLib.Object { - public static int main (string[] args) { - var test = new AlbumArtSpecTest (); - - test.run (); - - return 0; - } - - public void run() { - this.test_full_spec (); - //this.test_simple_spec (); - - /* This is just here to avoid a warning about an unused method: */ - var thumbnail = new Thumbnail(); - var didl_writer = new GUPnP.DIDLLiteWriter (null); - var didl_item = didl_writer.add_item (); - thumbnail.add_resource(didl_item, "http"); - } - - public void test_full_spec () { - var store = MediaArtStore.get_default (); - var item = new MusicItem (); - item.artist = "metallica"; - item.album = "and justice for all"; - item.title = "Enter Sandman"; - var file = store.get_media_art_file ("album", item); - assert (file != null); - assert (file.get_uri ().has_suffix - ("album-" + - "3c2234a7ce973bc1700e0c743d6a819c-" + - "3d422ba022ae0daa8f5454ba7dfa0f9a.jpeg")); - - file = store.get_media_art_file ("artist", item); - assert (file != null); - assert (file.get_uri ().has_suffix - ("artist-" + - "3c2234a7ce973bc1700e0c743d6a819c-" + - "3d422ba022ae0daa8f5454ba7dfa0f9a.jpeg")); - - item = new MusicItem (); - item.title = "radio ga ga"; - file = store.get_media_art_file ("radio", item); - assert (file != null); - assert (file.get_uri ().has_suffix - ("radio-" + - "b924ce08955675c6a30c745d18286d21-" + - "7215ee9c7d9dc229d2921a40e899ec5f.jpeg")); - - item = new MusicItem (); - item.artist = "met[xXx]allica"; - item.album = "and justice f[{]}or all"; - item.title = "Enter Sandman"; - file = store.get_media_art_file ("album", item); - assert (file != null); - assert (file.get_uri ().has_suffix - ("album-" + - "3c2234a7ce973bc1700e0c743d6a819c-" + - "3d422ba022ae0daa8f5454ba7dfa0f9a.jpeg")); - - // check block removal algorithm - normalizes to "metallica" and not - // "metca" - item = new MusicItem (); - item.artist = "met[xX[x]alli]ca"; - item.album = "and justice for all"; - item.title = "Enter Sandman"; - file = store.get_media_art_file ("album", item); - assert (file != null); - assert (file.get_uri ().has_suffix - ("album-" + - "3c2234a7ce973bc1700e0c743d6a819c-" + - "3d422ba022ae0daa8f5454ba7dfa0f9a.jpeg")); - - /* Fails due to unclear spec - item = new MusicItem (); - item.artist = "World Soccer"; - item.title = "Daily Podcast"; - file = store.get_media_art_file ("podcast", item); - assert (file != null); - assert (file.get_uri ().has_suffix - ("podcast-" + - "d717b10ec8fb35b11644995deb04b721-" + - "08d299536e562915eb133e2676396d3f.jpeg")); - */ - - // test banshee spec - item = new MusicItem (); - item.artist = "Peter Fox"; - item.album = "Stadtaffe"; - item.title = "Schwarz zu Blau"; - file = store.get_media_art_file ("album", item, true); - assert (file != null); - debug (file.get_uri()); - assert (file.get_uri ().has_suffix - ("album-15f9f69ee3d841df6b1e2f56439f11a2.jpg")); - } -} diff --git a/tests/rygel-media-art-store.vala b/tests/rygel-media-art-store.vala deleted file mode 120000 index fe11e0f2..00000000 --- a/tests/rygel-media-art-store.vala +++ /dev/null @@ -1 +0,0 @@ -../src/librygel-server/rygel-media-art-store.vala \ No newline at end of file -- cgit v1.2.1