gui/view: Initialize all libraries before running the test

Otherwise we'll get a message saying that either the filter or the
treeview is not a GtkTreeModel

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This commit is contained in:
Anna Schumaker 2017-03-24 11:39:21 -04:00
parent 1d3438932e
commit d3f505465c
1 changed files with 4 additions and 0 deletions

View File

@ -40,8 +40,10 @@ static void test_treeview()
while (idle_run_task() == true) {}
gui_filter_set_playlist(playlist_get(PL_SYSTEM, "Collection"));
filter = GTK_TREE_MODEL(gui_filter_get());
g_assert_nonnull(filter);
treeview = gui_treeview();
g_assert_nonnull(treeview);
g_assert((void *)gtk_tree_view_get_model(treeview) ==
(void *)gui_filter_get());
@ -61,6 +63,8 @@ int main(int argc, char **argv)
core_init(&argc, NULL, &init_data);
gui_builder_init("share/ocarina/ocarina.ui");
gui_model_init();
gui_filter_init();
gui_treeview_init();
gui_view_init();
while (idle_run_task()) {};