summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGarrett Regier <garrett.regier@riftio.com>2015-06-03 05:01:49 -0700
committerGarrett Regier <garrett.regier@riftio.com>2015-06-21 13:01:25 -0700
commit5d47bb3a72e12150d7862d602d5032cf920c3543 (patch)
tree2630f22888a018eafa1eace9932ecca9ab8205b6
parentcf6ea68018b94529aeb02aaa8b430c8d061e55c1 (diff)
downloadgobject-introspection-5d47bb3a72e12150d7862d602d5032cf920c3543.tar.gz
tests: Convert gitestthrows to use GTest framework
Based on a patch by Simon Feltman.
-rw-r--r--tests/repository/gitestthrows.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/tests/repository/gitestthrows.c b/tests/repository/gitestthrows.c
index 39a0df89..17694bfb 100644
--- a/tests/repository/gitestthrows.c
+++ b/tests/repository/gitestthrows.c
@@ -1,11 +1,9 @@
#include "girepository.h"
-#include <stdlib.h>
-
-int
-main(int argc, char **argv)
+static void
+test_invoke_gerror (void)
{
GIRepository *repo;
GITypelib *ret;
@@ -36,12 +34,20 @@ main(int argc, char **argv)
0,
&ret_arg,
&error);
- g_free(in_arg[0].v_string);
+ g_free (in_arg[0].v_string);
g_assert (invoke_return == FALSE);
g_assert (error != NULL);
g_assert (error->domain == G_FILE_ERROR);
g_assert (error->code == G_FILE_ERROR_NOENT);
+}
+
+int
+main(int argc, char **argv)
+{
+ g_test_init (&argc, &argv, NULL);
+
+ g_test_add_func ("/girepository/throws/invoke-gerror", test_invoke_gerror);
- exit(0);
+ return g_test_run ();
}