From a74c52e5cb715bdaf05ac80e98030a34a298f2b6 Mon Sep 17 00:00:00 2001 From: Anna Schumaker Date: Thu, 27 Aug 2015 11:01:55 -0400 Subject: [PATCH] tests/core: Update tags/genre test to new framework Signed-off-by: Anna Schumaker --- tests/core/Sconscript | 2 -- tests/core/tags/Sconscript | 1 + tests/core/tags/genre.cpp | 12 +++++------- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/tests/core/Sconscript b/tests/core/Sconscript index d2718e2e..2dfcabc3 100644 --- a/tests/core/Sconscript +++ b/tests/core/Sconscript @@ -24,8 +24,6 @@ res += [ CoreTest("idle", "idle.cpp") ] res += SConscript("tags/Sconscript") Return("res") -#test( "tags/album" ) -#test( "tags/genre" ) #test( "tags/library" ) #test( "tags/track" ) # diff --git a/tests/core/tags/Sconscript b/tests/core/tags/Sconscript index 0476f09d..b22b09b2 100644 --- a/tests/core/tags/Sconscript +++ b/tests/core/tags/Sconscript @@ -14,4 +14,5 @@ def TagTest(name, source): res = [ TagTest("generic", "generic.cpp") ] res += [ TagTest("artist", "artist.cpp") ] res += [ TagTest("album", "album.cpp") ] +res += [ TagTest("genre", "genre.cpp") ] Return("res") diff --git a/tests/core/tags/genre.cpp b/tests/core/tags/genre.cpp index 8d17c495..d0e5270c 100644 --- a/tests/core/tags/genre.cpp +++ b/tests/core/tags/genre.cpp @@ -2,7 +2,7 @@ * Copyright 2014 (c) Anna Schumaker. */ #include -#include +#include "../test.h" static void test_artist_tag() { @@ -34,9 +34,7 @@ static void test_genere_tag_lookup() test_equal(genre_db.size(), (unsigned)1); } -int main(int argc, char **argv) -{ - test :: run("Genre Tag Test", test_artist_tag); - test :: run("Genre Tag Lookup Test", test_genere_tag_lookup); - return 0; -} +DECLARE_UNIT_TESTS( + UNIT_TEST("Genre Tag", test_artist_tag), + UNIT_TEST("Genre Tag Lookup", test_genere_tag_lookup), +);