summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Bug 579008 - Don't override element-type for arraysColin Walters2009-06-234-0/+43
| | | | | | | Annotation parser patch from: Tim Horton <hortont424@gmail.com> If an explicit element type is specified, don't override it with guint8.
* Update annotation expected "tgir" for previous commitColin Walters2009-06-181-7/+7
| | | | | Since we're not writing out the zero-terminated flag now when we shouldn't, update the tests too.
* Bug 584453 - Handle char ** correctly (and const variation)Colin Walters2009-06-092-10/+10
| | | | | | | | | This patch fixes our default handling of char **. We add Return node types as a case where we test for array handling. Remove the hardcoded assumption of array = "no transfer", just use the separate Parameter/Return cases. This change causes inout char ** to be transfer="full", but that seems more correct.
* Move Everything into gir/, since it's a public libraryColin Walters2009-06-045-3075/+1
| | | | | Everything isn't a test for quite a while now, it's a public library. So move it to gir/.
* Add an Everything-1.0-expected.gir, test Everything versus itColin Walters2009-06-042-0/+1236
| | | | We should be testing the Everything library as well.
* A few transfer-related tests for "Everything"Andreas Rottmann2009-05-292-0/+52
|
* Better handle classes with non-standard to_underscore names.C. Scott Ananian2009-05-202-0/+130
| | | | | | | | | | | | | | | | | | | Previously we tried to guess what the "underscore version" of a class name would be, but for classes like NMSetting8021x we'd guess "nm_setting8021x" instead of "nm_setting_802_1x". All such guesses are subject to error: instead let's try to use the prefix of the _get_type() method instead, and only guess if that doesn't work. We do this for both class names and when detecting methods. An additional type with a "non-standard" underscored version (TestWi8021x) added to the everything.[ch] test suite to test proper conversion. GdkWindow and GObject have unusual get_type methods; add special quirks to handle these (at least until the methods are renamed upstream). (Slightly modified for PEP8 compliance by Colin Walters) Signed-off-by: Colin Walters <walters@verbum.org>
* Add GHash tests to Everything test GI library.C. Scott Ananian2009-05-122-2/+188
|
* Fix the list comparison assertions.C. Scott Ananian2009-05-121-4/+10
| | | | | | We weren't checking the length of the input list, and we were erroneously comparing every element in the test sequence against the *first* element of the passed-in list.
* Everything: more tests for integer array parameters.C. Scott Ananian2009-05-122-1/+92
|
* Fix annotations for GList and GSList tests.C. Scott Ananian2009-05-121-0/+40
|
* Enable the utf8 tests in the everything module.C. Scott Ananian2009-05-122-5/+19
| | | | We needed to tweak a couple of the tests for correctness.
* Remove (out) annotation for now from Everything structsColin Walters2009-05-071-2/+2
| | | | | | Right now these annotations don't work; (out) is for callee-allocates. For more information see http://bugzilla.gnome.org/show_bug.cgi?id=573314
* Fix typo in the TestInterface gtype nameTomeu Vizoso2009-05-061-1/+1
|
* Add an interface to EverythingTomeu Vizoso2009-05-052-0/+35
|
* Remove spurious addition of 'GSList *handlers' in last commitAndreas Rottmann2009-03-241-1/+0
|
* Additions to the 'Everything' namespaceAndreas Rottmann2009-03-242-3/+53
| | | | | - Make the destroy-notfied callback test harder by retaining the callbacks until test_callback_thaw_notifications() is called.
* Add a test signal with an argument flagged as G_SIGNAL_TYPE_STATIC_SCOPEJohan Bilien2009-03-242-0/+15
|
* Bug 574284 - Add support for a 'closure' and 'destroy' annotationsAndreas Rottmann2009-03-234-0/+92
| | | | | | | | | | This allows to annotate cases where the heuristics don't work. TODO: According to Juerbi, there are cases where two callbacks refer to the same user_data, which is prohibited by the current implementation. Signed-off-by: Andreas Rottmann <a.rottmann@gmx.at>
* Some small cosmetic tweaksAndreas Rottmann2009-03-192-3/+4
| | | | | | | | | | | * Fix compiler warnings: - Missing return value in annotation-testing code - Fix two function declarations to have a (void) parameter list -- this is not C++ ;-) * Add tools/g-ir-scanner to .gitignore, as it's now generated
* Bug 556475 – support Shadows: annotationAndreas Rottmann2009-03-194-0/+79
| | | | Add support for the 'Rename To:' annotation for functions and methods.
* Bug 564016 - Include c:prefix in typelib, use it to optimize find_by_gtypeColin Walters2009-03-176-6/+6
| | | | | | | Parse the c:prefix from the .gir, include it in the header. Armed with this information, we can now optimize lookups of GTypes because we have the requirement that GTypes must start with the c:prefix. We do fall back though if a lookup fails.
* Bug 564016 - Add c:prefix to .girColin Walters2009-03-176-6/+18
| | | | | | | This has a few use cases; the main one in mind right now is that when we place this in the .typelib as well, we can use it to optimize lookups based on GType names, by skipping entirely typelibs whose c:prefix is not a prefix of the target type lookup.
* Bug 575613 - Enum stripping with common prefix, also use "_" consistentlyColin Walters2009-03-173-0/+52
| | | | | | | | | | | | | Some enums have members which have a common prefix which doesn't match that of the enum name, but it also longer than the global namespace prefix. Instead, try stripping the common prefix first, and only if that fails fall back to the global strip. Also, for glib-registered enums we were using the nick, which typically has "-" as a separator. Replace that with "_" for consistency between unregistered enums and registered. utils.py:strip_common_prefix is now unused, delete.
* Bug 565147 - Add (type) annotation to override the C type definitionColin Walters2009-03-168-0/+82
| | | | | | We previously supported (type) on signals only, extend it to all cases. This is useful for a few cases where libraries use a superclass like GtkWidget* for C convenience, where the actual type is a subclass.
* Bug 574139 – There is no way to identify 'user_data' arguments in the ↵Andreas Rottmann2009-03-094-4/+4
| | | | | | | | | | | | callback signature Add a heuristic to the scanner that flags arguments of callbacks that are named 'user_data' (exact match) and have a 'any (void*) type. These arguments are marked by setting the 'closure' field of ArgBlob to the index of themselves. Signed-off-by: Andreas Rottmann <a.rottmann@gmx.at>
* Bug 557383 - Virtual method supportColin Walters2009-03-058-22/+321
| | | | | | | | | | | | | | | | Broadly speaking, this change adds the concept of <vfunc> to the .gir. The typelib already had most of the infrastructure for virtual functions, though there is one API addition. The scanner assumes that any class callback slot that doesn't match a signal name is a virtual. In the .gir, we write out *both* the <method> wrapper and a <vfunc>. If we can determine an association between them (based on the names matching, or a new Virtual: annotation), then we notate that in the .gir. The typelib gains an association from the vfunc to the function, if it exists. This will be useful for bindings since they already know how to consume FunctionInfo.
* Bug 573332 - Allow annotation of enums as bitfieldsAndreas Rottmann2009-03-044-13/+17
| | | | | | Add support for a `(type bitfield)' annotation for enums. Signed-off-by: Andreas Rottmann <a.rottmann@gmx.at>
* Bug 571548 - Generic attributesColin Walters2009-03-034-0/+27
| | | | | | | | We now support an extensible mechanism where arbitrary key-value pairs may be associated with almost all items, including objects, methods, and properties. These attributes appear in both the .gir and the .typelib.
* Keep TestStructA as simple by moving GObject member to a new structureColin Walters2009-03-031-1/+7
| | | | | The change in commit 2912b broke the gjs test suite which was relying on TestStructA being "simple" (i.e. only having primitive fields as members).
* Remove hand-written .gir files, move PEP-8 inquisition into top Makefile.amColin Walters2009-03-0315-527/+0
| | | | | | | We have more comprehensive testing in tests/scanner and tests/everything, and these tests were designed from a time when we were trying to make the g-ir-generate output exactly match the .gir, which has not been true for some time and will not be in the future.
* Add srcdir, so distcheck passesJohan Dahlin2009-02-271-2/+2
|
* Additions to "Everything" test namespaceAndreas Rottmann2009-02-272-0/+116
| | | | | | | Add a signal and a "bare" member (i.e. a member without getter/setter) to TestObj. Signed-off-by: Andreas Rottmann <a.rottmann@gmx.at>
* Revert "Bug 557383 - Virtual function support"Colin Walters2009-02-264-53/+25
| | | | | | | This reverts commit 4470a24e8cf3827efaddcfe240c3271cf1a0d6c0. Needs more work as it turns out, we need to figure out the binding story.
* Bug 557383 - Virtual function supportColin Walters2009-02-264-25/+53
| | | | | | | In order to determine whether a method is virtual, by default we look at the class table to find a callback field. This should be fairly reliable, but we may also later need annotations to more finely control this in the case of a name clash with a signal.
* Bug 572434 - Associate interfaces with their C structuresColin Walters2009-02-2511-36/+45
| | | | | | | | Similar to GObject class structs, we pair up GInterfaces with their C structures. Also, move some GLib-specific things into glibast.py, and make the naming more generic.
* Bug 555964 - Parse floating-point #definesColin Walters2009-02-253-0/+8
| | | | | | Previously we just supported int and string, add double to this. Technically we should probably differentiate between float and double, but it's not likely to be very useful in practice to do so.
* Bug 572790 - Don't register #defines from .c files as constantsColin Walters2009-02-244-2/+12
| | | | | We keep track of the source filename for every symbol. This enables us to later filter symbols based on that name.
* Bug 572965 – Allow generic marshaller to be called without parametersJohan Bilien2009-02-241-0/+18
| | | | | girepository/ginvoke.c: handle the case where n_param_values == 0. tests/invoke/genericmarshaller.c: add a test case for this.
* Bug 561604 - Don't fail on va_list*Colin Walters2009-02-231-0/+1
| | | | | gvariant uses va_list *; we were previously skipping va_list, we should skip indirect variants as well.
* Fix warnings pointed out by GCCJohan Dahlin2009-02-203-11/+14
|
* Be less verboseJohan Dahlin2009-02-201-5/+1
|
* Reformat the output to fit shaveJohan Dahlin2009-02-202-6/+5
|
* Use shave to reduce compiling outputJohan Dahlin2009-02-203-8/+8
| | | | Which let's us focus on the important warnings.
* Bug 572423 - Support --c-include argument for specifying C headersColin Walters2009-02-202-0/+2
| | | | | This option is for specifying inside the .gir what C header files should be included by C consumers (as opposed to parsed by the scanner).
* Bug 571483 - Sort toplevel .gir entriesColin Walters2009-02-176-740/+740
| | | | This ensures we're stable on a macro level.
* Merge branch 'master' of ssh://walters@git.gnome.org/git/gobject-introspectionColin Walters2009-02-171-1/+1
|\
| * Add missing tabJohan Dahlin2009-02-171-1/+1
| |
* | Merge branch 'master' of ssh://walters@git.gnome.org/git/gobject-introspectionColin Walters2009-02-173-6/+6
|\ \ | |/
| * Set LD_LIBRARY_PATH for girepository-1.0Johan Dahlin2009-02-173-6/+6
| | | | | | | | | | This is needed when girepository-1.0 is not installed and thus not in the library path.