39 lines
695 B
C
39 lines
695 B
C
/*
|
|
* Copyright 2016 (c) Anna Schumaker.
|
|
*/
|
|
#include <core/filter.h>
|
|
#include <core/idle.h>
|
|
#include <core/playlists/artist.h>
|
|
#include <core/tags/artist.h>
|
|
#include <core/tags/tags.h>
|
|
#include <tests/test.h>
|
|
|
|
|
|
void test_artist()
|
|
{
|
|
struct artist *artist;
|
|
|
|
idle_init_sync();
|
|
filter_init();
|
|
tags_init();
|
|
while (idle_run_task()) {};
|
|
|
|
artist = artist_find("Koji Kondo");
|
|
test_equal(artist->ar_playlist, NULL);
|
|
|
|
pl_artist_init(NULL);
|
|
while (idle_run_task()) {};
|
|
test_not_equal(artist->ar_playlist, NULL);
|
|
|
|
pl_artist_deinit();
|
|
test_equal(artist->ar_playlist, NULL);
|
|
|
|
tags_deinit();
|
|
filter_deinit();
|
|
idle_deinit();
|
|
}
|
|
|
|
DECLARE_UNIT_TESTS(
|
|
UNIT_TEST("Artist Playlists", test_artist),
|
|
);
|