mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 11:26:16 +01:00
tests: Port GObject singleton test to GTest framework
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This commit is contained in:
parent
edd497fc99
commit
7a4560e052
@ -67,10 +67,8 @@ my_singleton_class_init (MySingletonClass *klass)
|
||||
G_OBJECT_CLASS (klass)->constructor = my_singleton_constructor;
|
||||
}
|
||||
|
||||
/* --- test program --- */
|
||||
int
|
||||
main (int argc,
|
||||
char *argv[])
|
||||
static void
|
||||
test_singleton_construction (void)
|
||||
{
|
||||
MySingleton *singleton, *obj;
|
||||
|
||||
@ -85,5 +83,15 @@ main (int argc,
|
||||
|
||||
/* shutdown */
|
||||
g_object_unref (singleton);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
main (int argc,
|
||||
char *argv[])
|
||||
{
|
||||
g_test_init (&argc, &argv, NULL);
|
||||
|
||||
g_test_add_func ("/gobject/singleton/construction", test_singleton_construction);
|
||||
|
||||
return g_test_run ();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user