tests/core: Update deck test to new framework

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This commit is contained in:
Anna Schumaker 2015-08-31 08:17:07 -04:00
parent 1cb7eff37d
commit 077c6bf0c8
2 changed files with 8 additions and 12 deletions

View File

@ -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" )

View File

@ -4,7 +4,7 @@
#include <core/deck.h>
#include <core/library.h>
#include <core/tags/tags.h>
#include <tests/test.h>
#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),
);