]> git.draconx.ca Git - gob-dx.git/blobdiff - tests/interface.at
Add missing g_type_init calls to test cases.
[gob-dx.git] / tests / interface.at
index e750bc4b5c317d388cf4d40e180812934bd50818..113c22a60e19ac7b6beb9e3e331f7224bc14eade 100644 (file)
@@ -25,7 +25,10 @@ m4_define([TEST_FOOABLE_IMPL_DYN],
 TEST_TYPE_MODULE([$1])])
 
 m4_define([TEST_FOOABLE_IMPL_],
-[AT_DATA([$2.gob], [[%{
+[AT_DATA([$2.gob], [[%ctop{
+#include <config.h>
+%}
+%{
 #include <stdio.h>
 #include <stdlib.h>
 #include "test-fooable.h"
@@ -58,7 +61,8 @@ TEST_FOOABLE_IFACE()
 TEST_FOOABLE_IMPL([Test:A], [G:Object], [return 42;])
 
 AT_DATA([main.c],
-[[#include <stdio.h>
+[[#include <config.h>
+#include <stdio.h>
 #include <stdlib.h>
 #include "test-fooable.h"
 #include "test-a.h"
@@ -67,6 +71,7 @@ int main(void)
 {
   int rc;
 
+  g_type_init();
   rc = test_foo(g_object_new(TEST_TYPE_A, NULL));
   printf("%d\n", rc);
   if (rc < 0)
@@ -91,7 +96,8 @@ TEST_FOOABLE_IFACE()
 TEST_FOOABLE_IMPL_DYN([Test:A], [G:Object], [return 54;])
 
 AT_DATA([main.c],
-[[#include <stdio.h>
+[[#include <config.h>
+#include <stdio.h>
 #include <stdlib.h>
 #include "test-fooable.h"
 #include "test-a.h"
@@ -101,6 +107,7 @@ int main(void)
 {
   int rc;
 
+  g_type_init();
   g_type_module_use(g_object_new(TEST_TYPE_A_MOD, NULL));
 
   rc = test_foo(g_object_new(TEST_TYPE_A, NULL));
@@ -131,7 +138,8 @@ TEST_FOOABLE_IMPL([Test:B], [Test:A],
   [puts("Test:B foo called"); return 54;])
 
 AT_DATA([main.c],
-[[#include <stdio.h>
+[[#include <config.h>
+#include <stdio.h>
 #include <stdlib.h>
 #include "test-fooable.h"
 #include "test-a.h"
@@ -141,6 +149,7 @@ int main(void)
 {
   int rc;
 
+  g_type_init();
   rc = test_foo(g_object_new(TEST_TYPE_A, NULL));
   printf("%d\n", rc);
   if (rc < 0)
@@ -178,7 +187,8 @@ TEST_FOOABLE_IMPL_DYN([Test:B], [Test:A],
   [puts("Test:B foo called"); return 54;])
 
 AT_DATA([main.c],
-[[#include <stdio.h>
+[[#include <config.h>
+#include <stdio.h>
 #include <stdlib.h>
 #include "test-fooable.h"
 #include "test-a.h"
@@ -189,6 +199,7 @@ int main(void)
 {
   int rc;
 
+  g_type_init();
   g_type_module_use(g_object_new(TEST_TYPE_B_MOD, NULL));
 
   rc = test_foo(g_object_new(TEST_TYPE_A, NULL));
@@ -229,7 +240,8 @@ TEST_FOOABLE_IMPL_DYN([Test:B], [Test:A],
   [puts("Test:B foo called"); return 54;])
 
 AT_DATA([main.c],
-[[#include <stdio.h>
+[[#include <config.h>
+#include <stdio.h>
 #include <stdlib.h>
 #include "test-fooable.h"
 #include "test-a.h"
@@ -241,6 +253,7 @@ int main(void)
 {
   int rc;
 
+  g_type_init();
   g_type_module_use(g_object_new(TEST_TYPE_A_MOD, NULL));
   g_type_module_use(g_object_new(TEST_TYPE_B_MOD, NULL));
 
@@ -282,7 +295,8 @@ TEST_FOOABLE_IMPL([Test:C], [Test:B],
   [puts("Test:C foo called"); return PARENT_HANDLER(go);])
 
 AT_DATA([main.c],
-[[#include <stdio.h>
+[[#include <config.h>
+#include <stdio.h>
 #include <stdlib.h>
 #include "test-fooable.h"
 #include "test-a.h"
@@ -293,6 +307,7 @@ int main(void)
 {
   int rc;
 
+  g_type_init();
   rc = test_foo(g_object_new(TEST_TYPE_C, NULL));
   printf("%d\n", rc);
   if (rc < 0)
@@ -326,7 +341,8 @@ TEST_FOOABLE_IMPL_DYN([Test:C], [Test:B],
   [puts("Test:C foo called"); return PARENT_HANDLER(go);])
 
 AT_DATA([main.c],
-[[#include <stdio.h>
+[[#include <config.h>
+#include <stdio.h>
 #include <stdlib.h>
 #include "test-fooable.h"
 #include "test-a.h"
@@ -340,6 +356,7 @@ int main(void)
 {
   int rc;
 
+  g_type_init();
   g_type_module_use(g_object_new(TEST_TYPE_A_MOD, NULL));
   g_type_module_use(g_object_new(TEST_TYPE_B_MOD, NULL));
   g_type_module_use(g_object_new(TEST_TYPE_C_MOD, NULL));