diff --git a/CHANGELOG b/CHANGELOG index 698d48a6..72ea356d 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -7,6 +7,7 @@ - Various UI tweaks - Fix showing the first playlist in the list - Fix memory leaks in core/ +- Fix theme parsing errors 6.5.0-rc: - Convert to CMake/CTest diff --git a/tests/gui/builder.c b/tests/gui/builder.c index de4eff1f..68facf93 100644 --- a/tests/gui/builder.c +++ b/tests/gui/builder.c @@ -13,16 +13,9 @@ void test_builder_clicked() static void test_builder() { - int argc = 0; GObject *object; GtkWidget *widget; - g_assert_null(test_get_gui_builder()); - g_assert_null(gui_builder_object("button1")); - g_assert_null(gui_builder_widget("button1")); - - gtk_init(&argc, NULL); - gui_builder_init("tests/gui/builder.ui"); g_assert_nonnull(test_get_gui_builder()); object = gui_builder_object("button1"); @@ -47,6 +40,9 @@ static void test_builder() int main(int argc, char **argv) { + gtk_init(&argc, NULL); + gui_builder_init("tests/gui/builder.ui"); + g_test_init(&argc, &argv, NULL); g_test_add_func("/Gui/Builder", test_builder); return g_test_run(); diff --git a/tests/gui/model.c b/tests/gui/model.c index 5ae52acd..c2197cb3 100644 --- a/tests/gui/model.c +++ b/tests/gui/model.c @@ -172,13 +172,6 @@ static void test_model() GtkTreeIter iter; GtkLabel *label; GValue value; - int argc = 0; - - gtk_init(&argc, NULL); - core_init(&argc, NULL, &init_data); - gui_builder_init("share/ocarina/ocarina.ui"); - gui_queue_model_init(); - while (idle_run_task() == true) {} model = GTK_TREE_MODEL(gui_queue_model_get()); label = GTK_LABEL(gui_builder_widget("o_runtime")); @@ -299,6 +292,12 @@ static void test_model() int main(int argc, char **argv) { + gtk_init(&argc, NULL); + core_init(&argc, NULL, &init_data); + gui_builder_init("share/ocarina/ocarina.ui"); + gui_queue_model_init(); + while (idle_run_task()) {}; + g_test_init(&argc, &argv, NULL); g_test_add_func("/Gui/Queue Model/Init", test_init); g_test_add_func("/Gui/Queue Model/Empty", test_empty); diff --git a/tests/gui/view.c b/tests/gui/view.c index 4a4259b4..9b3d59f7 100644 --- a/tests/gui/view.c +++ b/tests/gui/view.c @@ -56,14 +56,6 @@ static void test_treeview() GtkTreePath *path; GtkTreeIter iter; unsigned int i; - int argc = 0; - - gtk_init(&argc, NULL); - core_init(&argc, NULL, &init_data); - gui_builder_init("share/ocarina/ocarina.ui"); - gui_queue_model_init(); - gui_view_init(); - while (idle_run_task() == true) {} playlist_new(PL_LIBRARY, "tests/Music/Hyrule Symphony"); while (idle_run_task() == true) {} @@ -119,6 +111,13 @@ static void test_treeview() int main(int argc, char **argv) { + gtk_init(&argc, NULL); + core_init(&argc, NULL, &init_data); + gui_builder_init("share/ocarina/ocarina.ui"); + gui_queue_model_init(); + gui_view_init(); + while (idle_run_task()) {}; + g_test_init(&argc, &argv, NULL); g_test_add_func("/Gui/Treeview", test_treeview); return g_test_run();