diff --git a/tests/core/Sconscript b/tests/core/Sconscript index a4938a09..2dd04506 100644 --- a/tests/core/Sconscript +++ b/tests/core/Sconscript @@ -28,8 +28,8 @@ res += [ CoreTest("queue", "queue.cpp") ] env.UsePackage("taglib") res += [ CoreTest("library", "library.cpp") ] res += [ CoreTest("playlist", "playlist.cpp") ] +res += [ CoreTest("deck", "deck.cpp") ] Return("res") -#test( "deck" ) #test( "audio" ) diff --git a/tests/core/deck.cpp b/tests/core/deck.cpp index b1307de3..de752d92 100644 --- a/tests/core/deck.cpp +++ b/tests/core/deck.cpp @@ -4,7 +4,7 @@ #include #include #include -#include +#include "test.h" static Queue *Q_NULL = NULL; static Track *TRACK_NULL = NULL; @@ -17,7 +17,7 @@ static void test_init() test_equal(deck :: next(), TRACK_NULL); - test :: cp_data_dir(); + test_cp_data_dir(); tags :: init(); library :: init(); deck :: init(); @@ -151,12 +151,8 @@ static void test_next_prev() test_equal(deck :: get_queues().size(), (size_t)0); } -int main(int argc, char **argv) -{ - test :: rm_data_dir(); - - test :: run("Deck Init Test", test_init); - test :: run("Deck Create, Move and Destroy Test", test_create_mv_destroy); - test :: run("Deck Next and Prev Test", test_next_prev); - return 0; -} +DECLARE_UNIT_TESTS( + UNIT_TEST("Deck Init", test_init), + UNIT_TEST("Deck Create, Move, and Destroy", test_create_mv_destroy), + UNIT_TEST("Deck Next and Prev", test_next_prev), +);