From 2712de76615c80bee8dc88c9c2ba4d40d763082f Mon Sep 17 00:00:00 2001 From: Tomeu Vizoso Date: Thu, 11 Aug 2011 15:46:31 +0200 Subject: [PATCH] Add a way to check for unintended effects of changes in g-ir-doctool --- configure.ac | 1 + tests/Makefile.am | 2 +- tests/doctool/Makefile.am | 20 + tests/doctool/Regress-1.0-expected.xml | 737 +++++++++++++++++++++++++++++++++ 4 files changed, 759 insertions(+), 1 deletion(-) create mode 100644 tests/doctool/Makefile.am create mode 100644 tests/doctool/Regress-1.0-expected.xml diff --git a/configure.ac b/configure.ac index 69da250..b349d8e 100644 --- a/configure.ac +++ b/configure.ac @@ -276,6 +276,7 @@ tests/offsets/Makefile tests/scanner/Makefile tests/repository/Makefile tests/warn/Makefile +tests/doctool/Makefile docs/Makefile docs/reference/Makefile gobject-introspection-1.0.pc diff --git a/tests/Makefile.am b/tests/Makefile.am index 4ae351f..20ecc17 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,6 +1,6 @@ include $(top_srcdir)/common.mk -SUBDIRS = . scanner repository offsets warn +SUBDIRS = . scanner repository offsets warn doctool EXTRA_DIST= BUILT_SOURCES= diff --git a/tests/doctool/Makefile.am b/tests/doctool/Makefile.am new file mode 100644 index 0000000..48ee1ce --- /dev/null +++ b/tests/doctool/Makefile.am @@ -0,0 +1,20 @@ +include $(top_srcdir)/common.mk + +Regress-1.0.gir: + cp ../scanner/Regress-1.0.gir . + +GIRS = Regress-1.0.gir +CHECKXML = $(GIRS:.gir=.xml.check) +DOCBOOKFILES = $(GIRS:.gir=.xml) +EXPECTEDDOCBOOKFILES = $(DOCBOOKFILES:.xml=-expected.xml) +CLEANFILES = $(DOCBOOK_FILES) +BUILT_SOURCES = $(DOCBOOK_FILES) +EXTRA_DIST = $(EXPECTEDDOCBOOKFILES) + +%.xml: %.gir + @g-ir-doc-tool $*.gir -o $*.xml + +%.xml.check: %.xml + @diff -u -U 10 $(srcdir)/$*-expected.xml $*.xml && echo " TEST $*.xml" + +check-local: $(CHECKXML) $(TYPELIBS) diff --git a/tests/doctool/Regress-1.0-expected.xml b/tests/doctool/Regress-1.0-expected.xml new file mode 100644 index 0000000..426d3d4 --- /dev/null +++ b/tests/doctool/Regress-1.0-expected.xml @@ -0,0 +1,737 @@ + + + Regress Documentation + + + + Regress Intset + + Synopsis + + + + + Details + + + + + + Regress SkippedStructure + + Synopsis + + + + + Details + + + + + + Regress TestBoxed + + Synopsis + +RegressTestBoxed* regress_test_boxed_copy (RegressTestBoxed* testboxed); +gboolean regress_test_boxed_equals (RegressTestBoxed* testboxed, + RegressTestBoxed* other); + + + + Details + + + copy + + copy + + +RegressTestBoxed* regress_test_boxed_copy (RegressTestBoxed* testboxed); + + + + + equals + + equals + + +gboolean regress_test_boxed_equals (RegressTestBoxed* testboxed, + RegressTestBoxed* other); + + + + + + + + Regress TestBoxedPrivate + + Synopsis + + + + + Details + + + + + + Regress TestFloating + + Synopsis + + + + + Details + + + + + + Regress TestFloatingClass + + Synopsis + + + + + Details + + + + + + Regress TestFundamentalObject + + Synopsis + +RegressTestFundamentalObject*regress_test_fundamental_object_ref (RegressTestFundamentalObject* testfundamentalobject); +void regress_test_fundamental_object_unref (RegressTestFundamentalObject* testfundamentalobject); + + + + Details + + + ref + + ref + + +RegressTestFundamentalObject*regress_test_fundamental_object_ref (RegressTestFundamentalObject* testfundamentalobject); + + + + + unref + + unref + + +void regress_test_fundamental_object_unref (RegressTestFundamentalObject* testfundamentalobject); + + + + + + + + Regress TestFundamentalObjectClass + + Synopsis + + + + + Details + + + + + + Regress TestFundamentalSubObject + + Synopsis + + + + + Details + + + + + + Regress TestFundamentalSubObjectClass + + Synopsis + + + + + Details + + + + + + Regress TestInterface + + Synopsis + + + + + Details + + + + + + Regress TestInterfaceIface + + Synopsis + + + + + Details + + + + + + Regress TestObj + + Synopsis + +int regress_test_obj_do_matrix (RegressTestObj* testobj, + char* somestr); +void regress_forced_method (RegressTestObj* testobj); +int regress_test_obj_instance_method (RegressTestObj* testobj); +void regress_test_obj_instance_method_callback(RegressTestObj* testobj, + RegressTestCallback callback); +void regress_test_obj_set_bare (RegressTestObj* testobj, + GObject* bare); +gboolean regress_test_obj_skip_inout_param (RegressTestObj* testobj, + gint a, + gint* out_b, + gdouble c, + gint* inout_d, + gint* out_sum, + gint num1, + gint num2); +gboolean regress_test_obj_skip_out_param (RegressTestObj* testobj, + gint a, + gint* out_b, + gdouble c, + gint* inout_d, + gint* out_sum, + gint num1, + gint num2); +gboolean regress_test_obj_skip_param (RegressTestObj* testobj, + gint a, + gint* out_b, + gdouble c, + gint* inout_d, + gint* out_sum, + gint num1, + gint num2); +gboolean regress_test_obj_skip_return_val (RegressTestObj* testobj, + gint a, + gint* out_b, + gdouble c, + gint* inout_d, + gint* out_sum, + gint num1, + gint num2); +void regress_test_obj_torture_signature_0 (RegressTestObj* testobj, + int x, + double* y, + int* z, + char* foo, + int* q, + guint m); +gboolean regress_test_obj_torture_signature_1 (RegressTestObj* testobj, + int x, + double* y, + int* z, + char* foo, + int* q, + guint m); + + + + Properties + + "bare" GObject.Object : Read / Write + "boxed" Regress.TestBoxed : Read / Write + "double" gdouble : Read / Write + "float" gfloat : Read / Write + "hash-table" : Read / Write + "int" gint : Read / Write + "list" : Read / Write + "string" utf8 : Read / Write + + + + Details + + + do_matrix + + do_matrix + + +int regress_test_obj_do_matrix (RegressTestObj* testobj, + char* somestr); + + This method is virtual. Notably its name differs from the virtual +slot name, which makes it useful for testing bindings handle this +case. + + + forced_method + + forced_method + + +void regress_forced_method (RegressTestObj* testobj); + + + + + instance_method + + instance_method + + +int regress_test_obj_instance_method (RegressTestObj* testobj); + + + + + instance_method_callback + + instance_method_callback + + +void regress_test_obj_instance_method_callback(RegressTestObj* testobj, + RegressTestCallback callback); + + + + + set_bare + + set_bare + + +void regress_test_obj_set_bare (RegressTestObj* testobj, + GObject* bare); + + + + + skip_inout_param + + skip_inout_param + + +gboolean regress_test_obj_skip_inout_param (RegressTestObj* testobj, + gint a, + gint* out_b, + gdouble c, + gint* inout_d, + gint* out_sum, + gint num1, + gint num2); + + Check that the out value is skipped + + + skip_out_param + + skip_out_param + + +gboolean regress_test_obj_skip_out_param (RegressTestObj* testobj, + gint a, + gint* out_b, + gdouble c, + gint* inout_d, + gint* out_sum, + gint num1, + gint num2); + + Check that the out value is skipped + + + skip_param + + skip_param + + +gboolean regress_test_obj_skip_param (RegressTestObj* testobj, + gint a, + gint* out_b, + gdouble c, + gint* inout_d, + gint* out_sum, + gint num1, + gint num2); + + Check that a parameter is skipped + + + skip_return_val + + skip_return_val + + +gboolean regress_test_obj_skip_return_val (RegressTestObj* testobj, + gint a, + gint* out_b, + gdouble c, + gint* inout_d, + gint* out_sum, + gint num1, + gint num2); + + Check that the return value is skipped + + + torture_signature_0 + + torture_signature_0 + + +void regress_test_obj_torture_signature_0 (RegressTestObj* testobj, + int x, + double* y, + int* z, + char* foo, + int* q, + guint m); + + + + + torture_signature_1 + + torture_signature_1 + + +gboolean regress_test_obj_torture_signature_1 (RegressTestObj* testobj, + int x, + double* y, + int* z, + char* foo, + int* q, + guint m); + + This function throws an error if m is odd. + + + + + + Regress TestObjClass + + Synopsis + + + + + Details + + + + + + Regress TestPrivateStruct + + Synopsis + + + + + Details + + + + + + Regress TestSimpleBoxedA + + Synopsis + +RegressTestSimpleBoxedA*regress_test_simple_boxed_a_copy (RegressTestSimpleBoxedA* testsimpleboxeda); +gboolean regress_test_simple_boxed_a_equals (RegressTestSimpleBoxedA* testsimpleboxeda, + RegressTestSimpleBoxedA* other_a); + + + + Details + + + copy + + copy + + +RegressTestSimpleBoxedA*regress_test_simple_boxed_a_copy (RegressTestSimpleBoxedA* testsimpleboxeda); + + + + + equals + + equals + + +gboolean regress_test_simple_boxed_a_equals (RegressTestSimpleBoxedA* testsimpleboxeda, + RegressTestSimpleBoxedA* other_a); + + + + + + + + Regress TestSimpleBoxedB + + Synopsis + +RegressTestSimpleBoxedB*regress_test_simple_boxed_b_copy (RegressTestSimpleBoxedB* testsimpleboxedb); + + + + Details + + + copy + + copy + + +RegressTestSimpleBoxedB*regress_test_simple_boxed_b_copy (RegressTestSimpleBoxedB* testsimpleboxedb); + + + + + + + + Regress TestStructA + + Synopsis + +void regress_test_struct_a_clone (RegressTestStructA* teststructa, + RegressTestStructA* a_out); + + + + Details + + + clone + + clone + + +void regress_test_struct_a_clone (RegressTestStructA* teststructa, + RegressTestStructA* a_out); + + Make a copy of a RegressTestStructA + + + + + + Regress TestStructB + + Synopsis + +void regress_test_struct_b_clone (RegressTestStructB* teststructb, + RegressTestStructB* b_out); + + + + Details + + + clone + + clone + + +void regress_test_struct_b_clone (RegressTestStructB* teststructb, + RegressTestStructB* b_out); + + Make a copy of a RegressTestStructB + + + + + + Regress TestStructC + + Synopsis + + + + + Details + + + + + + Regress TestStructD + + Synopsis + + + + + Details + + + + + + Regress TestStructFixedArray + + Synopsis + +void regress_test_struct_fixed_array_frob (RegressTestStructFixedArray* teststructfixedarray); + + + + Details + + + frob + + frob + + +void regress_test_struct_fixed_array_frob (RegressTestStructFixedArray* teststructfixedarray); + + + + + + + + Regress TestSubObj + + Synopsis + +int regress_test_sub_obj_instance_method (RegressTestSubObj* testsubobj); +void regress_test_sub_obj_unset_bare (RegressTestSubObj* testsubobj); + + + + Details + + + instance_method + + instance_method + + +int regress_test_sub_obj_instance_method (RegressTestSubObj* testsubobj); + + + + + unset_bare + + unset_bare + + +void regress_test_sub_obj_unset_bare (RegressTestSubObj* testsubobj); + + + + + + + + Regress TestSubObjClass + + Synopsis + + + + + Details + + + + + + Regress TestWi8021x + + Synopsis + +gboolean regress_test_wi_802_1x_get_testbool (RegressTestWi8021x* testwi8021x); +void regress_test_wi_802_1x_set_testbool (RegressTestWi8021x* testwi8021x, + gboolean v); + + + + Properties + + "testbool" gboolean : Read / Write + + + + Details + + + get_testbool + + get_testbool + + +gboolean regress_test_wi_802_1x_get_testbool (RegressTestWi8021x* testwi8021x); + + + + + set_testbool + + set_testbool + + +void regress_test_wi_802_1x_set_testbool (RegressTestWi8021x* testwi8021x, + gboolean v); + + + + + + + + Regress TestWi8021xClass + + Synopsis + + + + + Details + + + -- 2.7.4