38 lines
709 B
C
38 lines
709 B
C
/*
|
|
* Copyright 2016 (c) Anna Schumaker.
|
|
*/
|
|
#include <core/filter.h>
|
|
#include <core/idle.h>
|
|
#include <core/playlists/library.h>
|
|
#include <core/tags/library.h>
|
|
#include <core/tags/tags.h>
|
|
#include <tests/test.h>
|
|
|
|
void test_library()
|
|
{
|
|
struct library *library;
|
|
|
|
idle_init_sync();
|
|
filter_init();
|
|
tags_init();
|
|
while (idle_run_task()) {};
|
|
|
|
library = library_find("tests/Music");
|
|
test_equal(library->li_playlist, NULL);
|
|
|
|
pl_library_init(NULL);
|
|
while (idle_run_task()) {};
|
|
test_not_equal(library->li_playlist, NULL);
|
|
|
|
pl_library_deinit();
|
|
test_equal(library->li_playlist, NULL);
|
|
|
|
tags_deinit();
|
|
filter_deinit();
|
|
idle_deinit();
|
|
}
|
|
|
|
DECLARE_UNIT_TESTS(
|
|
UNIT_TEST("Library Playlists", test_library),
|
|
);
|