gobject-introspection r747 - trunk/tests/scanner



Author: walters
Date: Sat Oct 18 00:44:19 2008
New Revision: 747
URL: http://svn.gnome.org/viewvc/gobject-introspection?rev=747&view=rev

Log:
Add GtkFrob test that mirrors GtkSource


Added:
   trunk/tests/scanner/GtkFrob-1.0-expected.gir
   trunk/tests/scanner/gtkfrob.c
   trunk/tests/scanner/gtkfrob.h
Modified:
   trunk/tests/scanner/Makefile.am

Added: trunk/tests/scanner/GtkFrob-1.0-expected.gir
==============================================================================
--- (empty file)
+++ trunk/tests/scanner/GtkFrob-1.0-expected.gir	Sat Oct 18 00:44:19 2008
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+<repository version="1.0"
+            xmlns="http://www.gtk.org/introspection/core/1.0";
+            xmlns:c="http://www.gtk.org/introspection/c/1.0";
+            xmlns:glib="http://www.gtk.org/introspection/glib/1.0";>
+  <include name="GLib" version="2.0"/>
+  <include name="GObject" version="2.0"/>
+  <namespace name="GtkFrob" version="1.0" shared-library="gtkfrob">
+    <function name="language_manager_get_default"
+              c:identifier="gtk_frob_language_manager_get_default">
+      <return-value>
+        <type name="none" c:type="void"/>
+      </return-value>
+    </function>
+  </namespace>
+</repository>

Modified: trunk/tests/scanner/Makefile.am
==============================================================================
--- trunk/tests/scanner/Makefile.am	(original)
+++ trunk/tests/scanner/Makefile.am	Sat Oct 18 00:44:19 2008
@@ -4,7 +4,8 @@
 	libannotation.la \
 	libdrawable.la \
 	libfoo.la \
-	libutility.la
+	libutility.la \
+	libgtkfrob.la
 testlibdir = $(prefix)/unused
 install-testlibLTLIBRARIES: # prevent it from being installed
 
@@ -16,6 +17,7 @@
 libdrawable_la_SOURCES = $(srcdir)/drawable.c $(srcdir)/drawable.h
 libfoo_la_SOURCES = $(srcdir)/foo.c $(srcdir)/foo.h
 libutility_la_SOURCES = $(srcdir)/utility.c $(srcdir)/utility.h
+libgtkfrob_la_SOURCES = $(srcdir)/gtkfrob.c $(srcdir)/gtkfrob.h
 
 if OS_WIN32
 AM_LDFLAGS += -no-undefined
@@ -89,6 +91,20 @@
 	--output $@
 GIRS += utility-1.0.gir
 
+# This one tests different --namespace and --strip-prefix
+GtkFrob-1.0.gir: libgtkfrob.la gtkfrob.h $(SCANNER) $(SCANNER_LIBS) Makefile
+	PYTHONPATH=$(top_builddir):$$PYTHONPATH $(CHECK_DEBUG) $(SCANNER) -v \
+	--add-include-path=$(top_builddir)/gir --add-include-path=. \
+	--include=GObject-2.0 \
+	--library=gtkfrob \
+	--namespace=GtkFrob \
+	--strip-prefix=Gtk \
+	--nsversion=1.0 \
+	--pkg gobject-2.0 \
+	$(libgtkfrob_la_SOURCES) \
+	--output $@
+GIRS += GtkFrob-1.0.gir
+
 pre-check:
 	@if test "$(top_builddir)" != "$(top_srcdir)"; then \
 	   cp -f $(top_srcdir)/giscanner/*.py $(top_builddir)/giscanner; \

Added: trunk/tests/scanner/gtkfrob.c
==============================================================================
--- (empty file)
+++ trunk/tests/scanner/gtkfrob.c	Sat Oct 18 00:44:19 2008
@@ -0,0 +1,6 @@
+#include "gtkfrob.h"
+
+void
+gtk_frob_language_manager_get_default ()
+{
+}

Added: trunk/tests/scanner/gtkfrob.h
==============================================================================
--- (empty file)
+++ trunk/tests/scanner/gtkfrob.h	Sat Oct 18 00:44:19 2008
@@ -0,0 +1,11 @@
+#ifndef __UTILITY_H__
+#define __UTILITY_H__
+
+#include <glib-object.h>
+
+
+/* A global function */
+
+void gtk_frob_language_manager_get_default ();
+
+#endif /* __UTILITY_H__ */



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