[Spice-devel] [spice-common v3 2/6] test-region: Use GTest API

Christophe Fergeau cfergeau at redhat.com
Wed Jun 27 09:47:18 UTC 2018


Signed-off-by: Christophe Fergeau <cfergeau at redhat.com>
---
 tests/test-region.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/tests/test-region.c b/tests/test-region.c
index 38b3203..5a00cce 100644
--- a/tests/test-region.c
+++ b/tests/test-region.c
@@ -127,7 +127,7 @@ enum {
     EXPECT_CONT,
 };
 
-int main(void)
+static void test_region(void)
 {
     QRegion _r1, _r2, _r3;
     QRegion *r1 = &_r1;
@@ -396,6 +396,13 @@ int main(void)
     region_destroy(r3);
     region_destroy(r1);
     region_destroy(r2);
+}
+
+int main(int argc, char **argv)
+{
+    g_test_init(&argc, &argv, NULL);
+
+    g_test_add_func("/spice-common/region", test_region);
 
-    return 0;
+    return g_test_run();
 }
-- 
2.17.1



More information about the Spice-devel mailing list