summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* gimarshallingtests:: Add test for returning a caller-allocated GArrayGonzalo Odiard2012-12-172-0/+18
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=690041
* scanner: Warn if we're missing (element-type) for GPtrArrayColin Walters2012-12-102-0/+9
| | | | | | | | | | For background, See https://bugzilla.gnome.org/show_bug.cgi?id=629682 See https://bugzilla.gnome.org/show_bug.cgi?id=689871 Basically we should emit a warning here. https://bugzilla.gnome.org/show_bug.cgi?id=689998
* build: Include tests/scanner/annotationparser/* to EXTRA_DISTRico Tzschichholz2012-12-051-0/+49
|
* tests: Fix up WarnLib build, remove accidental additions to regress.cColin Walters2012-12-053-15/+33
| | | | Previous WarnLib commit was broken.
* tests: don't fake Automake silent modeDieter Verfaillie2012-12-031-2/+8
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=689570
* tests: fix incremental buildDieter Verfaillie2012-12-031-2/+2
| | | | | | | | Running make multiple times caused "mkdir" to complain that it could not create those directories because they where already there... https://bugzilla.gnome.org/show_bug.cgi?id=689570
* WarnLib: New library for testing API that emits warningsColin Walters2012-12-024-1/+60
| | | | | | | | | | | Both GIMarshallingTests and Regress right now use --warn-error; but in some cases (e.g. GErrors without a corresponding enum), we still want bindings to support the functionality. So add this new library where we can add C API that emits introspection warnings. https://bugzilla.gnome.org/show_bug.cgi?id=689488
* scanner: Parse comments with */ not on a new line, but emit a warningDieter Verfaillie2012-12-023-4/+54
| | | | | | We don't know how many apps do this, but at least ibus had one. https://bugzilla.gnome.org/show_bug.cgi?id=689354
* gimarshallingtests: Add a utf8-in-bytearray testColin Walters2012-11-292-0/+22
| | | | Will be used by gjs
* giscanner: update annotationparser to most recent gtkdoc-mkdb bug fixes.Dieter Verfaillie2012-11-282-0/+70
| | | | | | | This patch adds a test for and implements a more generic solution to GTK-Doc commit 47abcd53b8489ebceec9e394676512a181c1f1f6 https://bugzilla.gnome.org/show_bug.cgi?id=688897
* giscanner: Correctly detect invalid GTK-Doc comment block end markersDieter Verfaillie2012-11-281-0/+19
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=688897
* giscanner: treat the GTK-Doc Description: tag like any other tagDieter Verfaillie2012-11-281-0/+117
| | | | | | and add paragraph break tests. https://bugzilla.gnome.org/show_bug.cgi?id=688897
* giscanner: construct list of possible tag names for TAG_RE from _ALL_TAGS...Dieter Verfaillie2012-11-281-2/+2
| | | | | | | | ... instead of having a secondary hard-coded list. This results in the removal of giscanner/annotationpatterns.py to prevent a circular import. https://bugzilla.gnome.org/show_bug.cgi?id=688897
* giscanner: move unit tests from giscanner/annotationpatters.py...Dieter Verfaillie2012-11-282-0/+601
| | | | | | | ... to tests/scanner/annotationparser/test_patterns.py because the following patch will remove giscanner/annotationpatters.py https://bugzilla.gnome.org/show_bug.cgi?id=688897
* giscanner: add AnnotationParser testsDieter Verfaillie2012-11-2845-0/+5778
| | | | | | | | | | | | | | The tests in giscanner/annotationpatters.py only test the regular expression programs used when parsing GTK-Doc comment blocks but do not test the structure of the resulting "parse tree". This patch adds 193 GTK-Doc comment blocks and the expected results AnnotationParser should return (with it's current level of understanding of GTK-Doc comment block syntax). These are compared by tests/scanner/annotationparser/test_parser.py which complains with a diff on failure. https://bugzilla.gnome.org/show_bug.cgi?id=688897
* GIMarshallingTests: Add more virtual methods with out argumentsMartin Pitt2012-11-212-0/+55
| | | | | | | Add virtuals method which takes both an (in) and and (out) argument, and variants with both caller and callee allocation. This came up in https://bugzilla.gnome.org/show_bug.cgi?id=688783
* Regress: Update expected gir for previous changesRico Tzschichholz2012-11-211-0/+34
| | | | Changes introduced by 5153efd29e9a813a97d58905340c0ec4af04c5bd
* Add more tests for boxed typesGiovanni Campagna2012-11-202-0/+57
| | | | | | | gjs needs a boxed type that cannot be trivially allocated but has also a complex constructor. https://bugzilla.gnome.org/show_bug.cgi?id=612033
* GIMarshallingTests: Add GVariant propertyMartin Pitt2012-11-142-0/+17
|
* gimarshallingtests: Fix return data typeMartin Pitt2012-11-092-2/+2
| | | | | | gi_marshalling_tests_genum_returnv() should (and does) return a GIMarshallingTestsGEnum, not a GIMarshallingTestsEnum. The latter is already covered by gi_marshalling_tests_enum_returnv().
* gimarshallingtests: Add some GBytes testsColin Walters2012-11-072-0/+35
| | | | | | Will be used by gjs for new byte array work. https://bugzilla.gnome.org/show_bug.cgi?id=687696
* scanner: Emit correct type for unsigned integer constantsColin Walters2012-11-071-1/+1
| | | | | | Otherwise bindings will break. https://bugzilla.gnome.org/show_bug.cgi?id=685022
* tests: work around make check warningDieter Verfaillie2012-10-311-2/+5
| | | | | | | | | | The tests in tests/repository/ depend on libregress.so from tests/scanner which cannot be loaded during make check. Fixing this properly would require migrating to non-recursive automake for the tests, but for now we can just work around and set LD_LIBRARY_PATH (for linux) and PATH (for win32). http://bugzilla.gnome.org/show_bug.cgi?id=675049
* tests/offsets: Remove leftover g_type_init() callColin Walters2012-10-311-2/+0
|
* scanner: Correctly handle large 64 bit integer constantsColin Walters2012-10-302-0/+20
| | | | | | | | | | | | | | | | In C, positive integer constants are by default unsigned. This means an expression like 0x8000000000000000 will be "unsigned long long". In the actual scanner code, we were parsing them as "gint64", and storing them as gint64. This was incorrect; we need to parse them as guint64, and store the bits we get from that. This gives us an equivalent result to what the C compiler does. However, when we actually return the value as a Python "long" (arbitrary length integer), we need to treat the value as unsigned if the result indicated it was. https://bugzilla.gnome.org/show_bug.cgi?id=685022
* Expand on the documentation testsGiovanni Campagna2012-10-2812-0/+423
| | | | | | | | Add tests for complex function signatures (including arrays and callbacks), for enumerations and for static methods. Add JS reference files. https://bugzilla.gnome.org/show_bug.cgi?id=683046
* Add documentation for enumeration membersGiovanni Campagna2012-10-286-77/+166
| | | | | | | | Enum members were Annotated in the AST, and most code already assumed they could have docs. What was missing was reading the docs from the comment blocks and writing them in the XML. https://bugzilla.gnome.org/show_bug.cgi?id=683046
* regress: Add a test case for skipping a function with an unannotated callbackColin Walters2012-10-273-0/+29
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=685399
* gimarshallingtests: Attempt to avoid using reserved wordsColin Walters2012-10-272-276/+276
| | | | | | | | "int8" apparently blows up on AIX. It was kind of lame how we would just ad-hoc append a _. Since we only have one value for a lot of these, let's just go with the couldn't-be-any-simpler "v". https://bugzilla.gnome.org/show_bug.cgi?id=664166
* gmarshallingtests: Fix prototype () -> (void)Colin Walters2012-10-272-3/+3
| | | | Dear Python programmers, () doesn't mean what you think it means in C.
* scanner: Ignore #defines starting with _Colin Walters2012-10-271-1/+5
| | | | | | | | | This matches our behavior for symbols (and we should probably fix this more globally...I think we still scan _-prefixed enums). Noticed from gudev which had #define _GUDEV_INSIDE_H 1 https://bugzilla.gnome.org/show_bug.cgi?id=674072
* Drop calls to g_type_init()Colin Walters2012-10-164-7/+0
| | | | And bump our GLib requirement.
* [gobject-introspection] Add test method for GDestroy with no user dataSimon Feltman2012-10-113-0/+36
| | | | | | | Added regress_test_callback_destroy_notify_no_user_data. Updated Regress-1.0-expected.gir https://bugzilla.gnome.org/show_bug.cgi?id=685922
* gimarshallingtests: Add array/GList uint32/64 in/out APIMartin Pitt2012-10-112-0/+68
| | | | | | | | Add in/out API for testing arrays containing uint64, as well as GList containing uint32 (GList and GHash can't contain 64 bit values as they store them in pointers). https://bugzilla.gnome.org/show_bug.cgi?id=685860
* regress: Add API to test signals with (u)int64 paramsNicolas Dufresne2012-09-123-0/+102
| | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=683596 Co-Authored-By: Martin Pitt <martinpitt@gnome.org>
* gimarshallingtests: Add in/out int64 GValue method argumentsMartin Pitt2012-09-102-0/+30
| | | | See https://bugzilla.gnome.org/show_bug.cgi?id=683596
* Update tests to show off some new featuresJasper St. Pierre2012-08-294-17/+86
| | | | These includes more proper links and fundamentals.
* tests: Don't error out if there is no existing directoryJasper St. Pierre2012-08-291-2/+2
|
* scanner: methods cannot have an out-arg as their first argTorsten Schönfeld2012-08-213-0/+51
| | | | | | | | | | | | This ensures that if the first argument of a function like gboolean gdk_rgba_parse (GdkRGBA *rgba, const gchar *spec); is annotated as being an out-arg, the result is a class function with two arguments, not a method with one argument. Previously, the (out) annotation was simply ignored. https://bugzilla.gnome.org/show_bug.cgi?id=682124
* gimarshallingtests: Add GParamSpec return and (out) argumentMathieu Duponchelle2012-08-202-0/+25
| | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=681565 Co-Authored-By: Martin Pitt <martinpitt@gnome.org>
* build: Ensure cairo-gobject always ends up in cairo.girColin Walters2012-08-141-6/+5
| | | | | | | | | | | We were conditionalizing on the presence of cairo in the buildroot, but that's super lame since it makes a huge mess of the build dependency graph. Let's just always stick cairo-gobject in there. I doubt anyone cares anymore about building g-i on really old systems without it. If they do...well, we can revisit this again.
* Revert "Implement "rename to" annotation for records"Colin Walters2012-08-133-63/+0
| | | | | | | | | | | | | This reverts commit 764366f7e4ef5a765a24ffac8c60b811f38b9ad9. It can't work right now because to really use the structures, you need to register them as a boxed, and that means we also need to rename the boxed type. A future version of this patch will need to handle both the structure name and the GType name. https://bugzilla.gnome.org/show_bug.cgi?id=675985
* tests: Fix coding style and compiler warning in regressColin Walters2012-08-052-5/+8
| | | | Previous commit used old-style declarations which was broken.
* Test typedef in #defineAlban Browaeys2012-08-032-0/+11
| | | | requires "handle unsigned properly for type of defined size" patch.
* scanner: handle unsigned properly for type of defined sizeAlban Browaeys2012-08-032-0/+6
|
* giscanner: special case G_GINT64_CONSTANT and G_GUINT64_CONSTANT + miscAlban Browaeys2012-08-032-0/+6
| | | | | | | | | This let the macro expands to its value as gint64/guint64. Also - fix lexer identifier/typdef detection for macro and misc - do not discard cast
* gimarshallingtests: More useful assertionsMartin Pitt2012-08-021-257/+257
| | | | | | Convert the simple g_assert() statements into g_assert_cmp*, to show what the actual value is in case of a failure. This makes it easier to port g-i/pygobject/etc. to new architectures which exhibit bugs, like powerpc64.
* Regress: Update expected gir for previous changesColin Walters2012-07-311-1/+1
|
* gimarshallingtests: Squash compiler warningColin Walters2012-07-311-2/+2
|
* tests: Fix comment about expected resultJon Nordby2012-07-291-1/+1
|