diff --git a/tests/core/Sconscript b/tests/core/Sconscript index 2dd04506..0060a946 100644 --- a/tests/core/Sconscript +++ b/tests/core/Sconscript @@ -29,7 +29,6 @@ env.UsePackage("taglib") res += [ CoreTest("library", "library.cpp") ] res += [ CoreTest("playlist", "playlist.cpp") ] res += [ CoreTest("deck", "deck.cpp") ] +res += [ CoreTest("audio", "audio.cpp") ] Return("res") - -#test( "audio" ) diff --git a/tests/core/audio.cpp b/tests/core/audio.cpp index 14a0deb6..23cbf506 100644 --- a/tests/core/audio.cpp +++ b/tests/core/audio.cpp @@ -4,7 +4,7 @@ #include #include #include -#include +#include "test.h" Track *TRACK_NULL = NULL; @@ -35,7 +35,7 @@ public: void seek_to(int64_t offset) { cur_pos = offset; } int64_t position() { return cur_pos; } int64_t duration() { return cur_duration; } -}; +} driver; void test_pre_init() @@ -76,7 +76,7 @@ void test_init() { Track *track; - test :: cp_data_dir(); + test_cp_data_dir(); audio :: init(); track = audio :: current_track(); @@ -183,13 +183,9 @@ void test_autopause() test_equal(driver->is_playing(), false); } -int main(int argc, char **argv) -{ - TestDriver driver; - test :: run("Test Audio Pre-Init", test_pre_init); - test :: run("Test Audio Init", test_init); - test :: run("Test Audio Playback Controls", test_playback_controls); - test :: run("Test Audio Track Controls", test_track_controls); - test :: run("Test Audio Automatic Pausing", test_autopause); - return 0; -} +DECLARE_UNIT_TESTS( + UNIT_TEST("Test Audio Pre-Init", test_pre_init), + UNIT_TEST("Test Audio Init", test_init), + UNIT_TEST("Test Audio Playback Controls", test_playback_controls), + UNIT_TEST("Test Audio Automatic Pausing", test_autopause), +);