Commit 7ea993e3 authored by Guido Gunther's avatar Guido Gunther

Add test to check object lifecycle bugs easily

Further tests will need mocks for phosh.c
parent cb86db1f
type: 'boolean', value: true,
description: 'Whether to compile unit tests')
if get_option('tests')
test_env = [
test_cflags = [
test_link_args = [
cls_names = [
foreach cls_name : cls_names
t = executable('test-@0@'.format(cls_name),
c_args: test_cflags,
link_args: test_link_args,
dependencies: phosh_deps,
test(cls_name, t, env: test_env)
* Copyright (C) 2018 Purism SPC
* SPDX-License-Identifier: GPL-3.0+
* Author: Guido Günther <>
#include "favorites.h"
static void
GtkWidget *window = phosh_favorites_new ();
g_assert (window);
gtk_widget_destroy (window);
main (gint argc,
gchar *argv[])
gtk_test_init (&argc, &argv, NULL);
g_test_add_func("/phosh/favorites/new", test_phosh_favorites_new);
return g_test_run();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment