[folks] Ensure that the C bits of TestCase are pre-declared in a header



commit fa1a9b56a8f420b2672f668a558c42d17429f760
Author: Simon McVittie <simon mcvittie collabora co uk>
Date:   Thu Apr 11 12:05:08 2013 +0100

    Ensure that the C bits of TestCase are pre-declared in a header
    
    This lets us verify that their Vala and C ABIs are the same: if they
    are not, compilation will fail.
    
    Bug: https://bugzilla.gnome.org/show_bug.cgi?id=697354
    Signed-off-by: Simon McVittie <simon mcvittie collabora co uk>
    Reviewed-by: Philip Withnall <philip tecnocode co uk>

 tests/lib/Makefile.am             |    1 +
 tests/lib/haze-remove-directory.c |    2 +-
 tests/lib/test-case-helper.c      |    2 +-
 tests/lib/test-case.vala          |    2 +-
 4 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/tests/lib/Makefile.am b/tests/lib/Makefile.am
index 9ed4ab9..7412287 100644
--- a/tests/lib/Makefile.am
+++ b/tests/lib/Makefile.am
@@ -85,6 +85,7 @@ libfolks_test_la_VALAFLAGS = \
        --pkg build-conf \
        --library folks-test \
        -H folks-test.h \
+       -h folks-test-internal.h \
        -g \
        $(NULL)
 
diff --git a/tests/lib/haze-remove-directory.c b/tests/lib/haze-remove-directory.c
index f673270..0a8be8b 100644
--- a/tests/lib/haze-remove-directory.c
+++ b/tests/lib/haze-remove-directory.c
@@ -8,7 +8,7 @@
  * notice and this notice are preserved.
  */
 
-#include "folks-test.h"
+#include "folks-test-internal.h"
 
 #include <glib/gstdio.h>
 
diff --git a/tests/lib/test-case-helper.c b/tests/lib/test-case-helper.c
index 47bf8f4..0011b37 100644
--- a/tests/lib/test-case-helper.c
+++ b/tests/lib/test-case-helper.c
@@ -20,7 +20,7 @@
  *     Simon McVittie <simon mcvittie collabora co uk>
  */
 
-#include "folks-test.h"
+#include "folks-test-internal.h"
 
 #include <glib.h>
 #include <glib-object.h>
diff --git a/tests/lib/test-case.vala b/tests/lib/test-case.vala
index dddfa04..82b0700 100644
--- a/tests/lib/test-case.vala
+++ b/tests/lib/test-case.vala
@@ -241,7 +241,7 @@ public abstract class Folks.TestCase : Object
     }
 
   /* implemented in test-case-helper.c */
-  private extern GLib.TestCase add_test_helper (string name, TestMethod test);
+  internal extern GLib.TestCase add_test_helper (string name, TestMethod test);
 
   /**
    * Set up for one test. If you have more than one test, this will


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]