summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* fix invoke testsSaleem Abdulrasool2009-12-151-2/+2
| | | | | | retval should be a valid pointer https://bugzilla.gnome.org/show_bug.cgi?id=604472
* Add a Makefile.introspectionJohan Dahlin2009-12-142-84/+45
| | | | | This will make it easier for third-party projects to use introspection by having easy make rules.
* Fix an annotationparser bug for empty tagsJohan Dahlin2009-12-093-1/+39
| | | | | | Makes sure we can parse empty tags such as '@foo:' without adding a : in the end which the typelib compiler will complain about
* Fix foo-1.0-expected.{gir,tgir} for callback patchColin Walters2009-12-082-2/+5
|
* Better scope in GAsyncReadyCallback/GDestroyNotifyJohan Dahlin2009-12-028-3/+88
| | | | | | | | GAsyncReadyCallback should have use the async scope per default and GDestroyNotify should be notified if the previous parameters are a callback and user data. Fixes https://bugzilla.gnome.org/show_bug.cgi?id=602862
* Make (skip) annotation work everywhereDan Winship2009-11-232-0/+13
| | | | | | | | Previously it only worked for toplevel nodes. Now it works for any node except <field>, since skipping a field would cause the description of the struct layout to be wrong. https://bugzilla.gnome.org/show_bug.cgi?id=602652
* Fix enum prefix stripping to work only up to word boundariesDan Winship2009-11-233-0/+17
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=602672
* Implement callbacks as part of struct fields. Fixes #557383Tomeu Vizoso2009-11-112-62/+144
| | | | | | gir: embed <callback> inside <field> typelib: if a field contains a callback, store it just after the FieldBlob girepository API: no additions
* When doing type resolution on a string, treat it as its own ctypeColin Walters2009-10-223-0/+13
| | | | | | | | | | Calling _resolve_param_type on a string instead of Node is fairly unusual, and (as far as I could see) basically only happened in the Array processing code. We were passing None as the ctype in this case, but we might as well try using the name as a ctype too. This fixes using GCallback (and in general any item in an array that comes from an included gir).
* Fix make check after f152f5e97df7Tomeu Vizoso2009-10-222-23/+23
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=599327
* Fix make check after 0d9cfb004d528Tomeu Vizoso2009-10-222-2/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=599327
* Remove a remnant of shaveJohan Bilien2009-09-181-1/+1
|
* Bug 556628 – (skip) annotationDan Winship2009-08-242-0/+28
| | | | | Adds a (skip) option that can be added to the header of any doc comment to cause that symbol to be skipped in the .gir output
* LD_LIBRARY_PATH exorcismColin Walters2009-08-243-7/+5
| | | | | | | | | | | | | | | Thanks to commit 6d510b8db, we now no longer need LD_LIBRARY_PATH to be set for invoking the compiler. Next, before we were taking the LD_LIBRARY_PATH variable and turning it into a compile path, presumably to attempt to handle the cases where we weren't getting the right -L flags. Also interacting with this was a while ago we weren't really doing uninstalled libtool libraries correctly, which is probably how hacks involving LD_LIBRARY_PATH crept into the scanner. Just require that we're passed the right -L flags, and we should be doing libtool libraries better now.
* Remove some $(builddir) that crept back inOwen W. Taylor2009-08-202-4/+4
| | | | | | | With recent merges, a few instances of $(builddir) got reintroduced. Remove them. http://bugzilla.gnome.org/show_bug.cgi?id=592114
* Bug 592055 - Build/test fixesColin Walters2009-08-171-1/+1
| | | | The last few commits regressed 'check'; fix those up.
* Also remove LD_LIBRARY_PATH bit from before AM_V_GEN for BarAppColin Walters2009-08-171-1/+1
|
* Support passing --library=lib<foo>.laOwen W. Taylor2009-08-1712-19/+23
| | | | | | | | | | | | | | | | In addition to the current --library=<foo>, support --library=lib<foo>.la. This makes it unambiguous that we are referencing an uninstalled library and allows accurate extraction of the shared library name for the uninstalled library. * tests/scanner/Makefile.am tests/offsets/Makefile.am: Use the new form of --library=. Also some LD_LIBRARY_PATH frobbing as needed. *-expected.gir *-expected.tgir: We now pick out the shared library accurately, so fix shared-library="" in our reference girs. (The comparison may need some pre-sanitization now to work on non-ELF) http://bugzilla.gnome.org/show_bug.cgi?id=591669
* Resolve library names to shared libraries ourselvesOwen W. Taylor2009-08-171-2/+2
| | | | | | | | | | | | | | | | | | | | | Using ctypes.util.find_library() to resolve library names to sonames causes problems with dealing with uninstalled libtool operation properly. We're unlikely to find any way of combining the two that will be robust against future changes in both facilities. Switch to a different approach - run 'ldd' on the compiled introspection binary and extract sonames from there This is less portable but should be quite robust where it works. utils.py dumper.py: Move libtool-command-line finding into utils.py girwriter.py: Remove library name resolution from here, expect libraries to be passed in preresolved. shlibs.py scannermain.py: New file including resolve_shlibs() to resolve library names using the introspection binary. tests/scanner/Makefile.am: Add .libs to LD_LIBRARY_PATH http://bugzilla.gnome.org/show_bug.cgi?id=591669
* autoconf-2.64 compat: Don't use $(builddir)Owen W. Taylor2009-08-171-2/+2
| | | | | | | | $(builddir) is not a standard automake variable. With autoconf < 2.64 it ends up getting set in every Makefile.in to '.' (because autoconf defines it), but that is no longer the case for 2.64. Since $(builddir) was always '.', just use that instead.
* Excise shave in favor of automake 1.11 silent rulesColin Walters2009-08-161-6/+6
| | | | Shave is just way too invasive in the build system.
* Prepend to $LD_LIBRARY_PATH not appendOwen W. Taylor2009-08-131-2/+2
| | | | | | | We want to extend $LD_LIBRARY_PATH from the front so that uninstalled libraries take precedence over installed libraries. http://bugzilla.gnome.org/show_bug.cgi?id=591740
* Allow annotations on fieldsAndreas Rottmann2009-07-034-0/+29
| | | | Plain fields (i.e. non-callbacks) may have a 'type' annotation now.
* 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.