tests/core: Update deck test to new framework
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This commit is contained in:
parent
1cb7eff37d
commit
077c6bf0c8
|
@ -28,8 +28,8 @@ res += [ CoreTest("queue", "queue.cpp") ]
|
||||||
env.UsePackage("taglib")
|
env.UsePackage("taglib")
|
||||||
res += [ CoreTest("library", "library.cpp") ]
|
res += [ CoreTest("library", "library.cpp") ]
|
||||||
res += [ CoreTest("playlist", "playlist.cpp") ]
|
res += [ CoreTest("playlist", "playlist.cpp") ]
|
||||||
|
res += [ CoreTest("deck", "deck.cpp") ]
|
||||||
|
|
||||||
Return("res")
|
Return("res")
|
||||||
|
|
||||||
#test( "deck" )
|
|
||||||
#test( "audio" )
|
#test( "audio" )
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#include <core/deck.h>
|
#include <core/deck.h>
|
||||||
#include <core/library.h>
|
#include <core/library.h>
|
||||||
#include <core/tags/tags.h>
|
#include <core/tags/tags.h>
|
||||||
#include <tests/test.h>
|
#include "test.h"
|
||||||
|
|
||||||
static Queue *Q_NULL = NULL;
|
static Queue *Q_NULL = NULL;
|
||||||
static Track *TRACK_NULL = NULL;
|
static Track *TRACK_NULL = NULL;
|
||||||
|
@ -17,7 +17,7 @@ static void test_init()
|
||||||
|
|
||||||
test_equal(deck :: next(), TRACK_NULL);
|
test_equal(deck :: next(), TRACK_NULL);
|
||||||
|
|
||||||
test :: cp_data_dir();
|
test_cp_data_dir();
|
||||||
tags :: init();
|
tags :: init();
|
||||||
library :: init();
|
library :: init();
|
||||||
deck :: init();
|
deck :: init();
|
||||||
|
@ -151,12 +151,8 @@ static void test_next_prev()
|
||||||
test_equal(deck :: get_queues().size(), (size_t)0);
|
test_equal(deck :: get_queues().size(), (size_t)0);
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
DECLARE_UNIT_TESTS(
|
||||||
{
|
UNIT_TEST("Deck Init", test_init),
|
||||||
test :: rm_data_dir();
|
UNIT_TEST("Deck Create, Move, and Destroy", test_create_mv_destroy),
|
||||||
|
UNIT_TEST("Deck Next and Prev", test_next_prev),
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user