summaryrefslogtreecommitdiff
path: root/tests/scanner/Regress-1.0-Gjs-expected
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'standalone-doc-sections' into 'master'Mathieu Duponchelle2020-07-221-0/+15
|\ | | | | | | | | Add the notion of standalone doc sections. See merge request GNOME/gobject-introspection!226
| * Add the notion of standalone doc sections.Mathieu Duponchelle2020-07-121-0/+15
| | | | | | | | | | | | | | | | Up to now, section annotations had to match a class or interface name in order to be serialized in the gir. With this commit, they now get serialized as docsection nodes, for potential use by documentation tools.
* | giscanner: parse block comments for members and fieldsMathieu Duponchelle2020-07-123-0/+23
|/ | | | | | | | | | | | | | | | | | | | | | | | | | There was previously no mechanism for tagging enum members and struct fields with Since tags (or other, eg deprecation tags). While the customary place to add Since tags for these symbols is inline in the parent symbol's documentation eg: /** * Foo: * * @FOO_BAR: some bar. Since X.Y */ And variations on that theme, implementing parsing for that scheme would result in a pretty ambiguous grammar, especially if we also want support for multiple tags. Instead, the solution implemented here is to allow providing documentation for individual members and fields through their own separate block, as is done for virtual functions already. Inline comments are still used, with a lower precedence. Fixes #348
* Revert "Add support for element-type to GListModel"Rico Tzschichholz2020-04-282-65/+0
| | | | | | Breaks vapigen and changes GListModel definition in Gio-2.0.gir This reverts commit a9f45431684e6be3623e272e54d481e4c5d9423d.
* Add support for element-type to GListModelEmmanuele Bassi2020-04-262-0/+65
| | | | | | | | GListModel is an interface for creating typed, list-like containers. The data stored is GObject instances, but it's useful to be able to annotate the actual type, for both documentation and code generation purposes. The annotation should be optional, to maintain backward compatibility.
* Revert "Add element-type support to GListModel"Emmanuele Bassi2020-04-261-33/+0
| | | | | | This reverts commit b4c058bba4d95ae10e1e4238f9417fe954f97795. See: #336
* Revert "Generate appropriate docs for ListModel with element-type"Emmanuele Bassi2020-04-261-2/+2
| | | | | | This reverts commit ffe3e435e0b7943a0872034223b5f6ea02258ffa. See: #336
* Generate appropriate docs for ListModel with element-typeEmmanuele Bassi2020-04-241-2/+2
| | | | | | We need to special case the ListModel container type in the documentation writer so that we don't fall back into array/list automatic conversion in the code snippets.
* Add element-type support to GListModelEmmanuele Bassi2020-04-241-0/+33
| | | | | | | | GListModel is an interface for creating typed, list-like containers. The data stored is GObject instances, but it's useful to be able to annotate the actual type, for both documentation and code generation purposes. Fixes: #328
* Support array arguments with static keywordEmmanuele Bassi2019-09-151-0/+36
| | | | | | | | | | | | | | | | | | | | | | | C99 allows defining an array argument with a fixed size as: void foo (int arr[static 10]) Compilers conforming to the C99 specification will be able to warn if the function is called with NULL or with an array smaller than the specified length, something that does not happen when using pre-C99 declarations like: void foo (int arr[10]) As the declaration above is identical to: void foo (int arr[]) Which is, in turn, identical to: void foo (int *arr) Fixes: #309
* regress: Add regression test for signal with GError paramPhilip Chimento2019-08-013-0/+86
| | | | | | | | This exercises the little-used code path where a signal is emitted with a nullable GError as a parameter. It's modeled after GstPbutils.Discoverer's 'discovered' signal. See GNOME/gjs#262.
* tests: Add functions using flat struct arraysTomasz Miąsko2019-01-087-0/+207
| | | | | | | | | | | | | | Relatively common in practice are: * output with transfer full, which is already covered by `regress_test_array_struct_out`, * input with transfer none, covered by a new `regress_test_array_struct_in_none` Other variants are quite esoteric, but it still might be useful to include them so that bindings can verify that they are handled gracefully, e.g., by reporting an error instead of crashing. Issue #90
* scanner: Merge basic types in `specifier_qualifier_list` production.Tomasz Miąsko2019-01-052-0/+19
| | | | | | | | | | | This is necessary to parse types like `unsigned char` or `long double`, and is already done when parsing `declarations_specifiers`. Examples that are fixed by this change include: * `GLib.TestLogMsg.nums` previously parsed as `long` but should be `long double`. * `GMime.Encoding.uubuf` previously parsed as `unsigned` but should be `unsigned char`.
* Define grefcount and gatomicrefcount as aliases to gintTomasz Miąsko2018-11-233-0/+79
|
* regress: Implement interface and override propertiesPhilip Chimento2018-11-073-3/+25
| | | | | | | | This adds a property to RegressTestInterface which can be overridden, and makes RegressTestSubObj implement it and override the property. This is in order to catch the regressions in GJS around property access. See gjs#193.
* regress: Add test for write-only propertyPhilip Chimento2018-10-221-0/+16
| | | | | | | GTK contains a few write-only properties, so it makes sense to have one in the regress test suite. See gjs!246
* Fix scanner tests for new functions added with !32Christoph Reiter2018-07-224-0/+113
| | | | These tests only get run with autotools atm
* Add regression tests for default ByteArray element type.Tomasz Miąsko2018-04-152-0/+19
|
* Reuse const_table between calls to SourceScanner parse_files and parse_macros.Tomasz Miąsko2018-02-131-0/+14
| | | | | | | | Macro constants may now refer to constants defined in source files. Test case provided by Philip Chimento. Fixes issues #173 and #75.
* regress: Check that enum value assignments work for all membersEmmanuele Bassi2018-01-251-0/+4
| | | | | | | Value assignments can happen at any point in the enumeration declaration. https://bugzilla.gnome.org/show_bug.cgi?id=629667
* regress: Test for property and method with conflicting namesRico Tzschichholz2017-07-213-0/+45
| | | | | | | | | | This is something that libraries are not supposed to do, but some do anyway (Soup and Clutter are two examples) and language bindings should handle it somehow or other. In GJS we want to make sure that the way it's handled doesn't change inadvertently, because buggy library code should not break existing user code. https://bugzilla.gnome.org/show_bug.cgi?id=785091
* Add a test for "(in) (transfer floating)" parameters beeing an alias for ↵Christoph Reiter2017-05-171-1/+9
| | | | | | | | | | | | | | | | | | | | | "(in) (transfer none)". The "(in)" alias was (unintenionally?) introduced in https://git.gnome.org/browse/gobject-introspection/commit/?id=699ad0fec427c79bec1 which added an alias for return annotations. This change makes sure that this continues to work. Functions which ref_sink in params are currently marked as transfer-none since in the case of non-floating objects (which all bindings use) no ownership gets transfered. But in case of floating objects, which is the common case when using the C API directly, the ownership _is_ transfered. Using transfer-floating should make this clearer while giving the same result for bindings. Functions where this could be used: gst_bin_add, gtk_container_add, gst_element_add_pad See https://bugzilla.gnome.org/show_bug.cgi?id=657202 and https://bugzilla.gnome.org/show_bug.cgi?id=702960 https://bugzilla.gnome.org/show_bug.cgi?id=742618
* regress: Add test for setting a NULL strv in a GValueSam Spilsbury2017-04-251-0/+32
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=775679
* tests: Update "expected" for hidden fundamental classRico Tzschichholz2017-01-173-2/+34
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=760056
* tests: add regression test for anonymous structScott D Phillips2016-05-082-0/+60
| | | | | | | C11 which added support for anonymous unions (already supported) also adds support for anonymous structs. https://bugzilla.gnome.org/show_bug.cgi?id=766011
* tests: Add regression test for signal w. array+lenPhilip Chimento2016-02-082-1/+29
| | | | | | | | This is a regression test for marshalling callback arguments from signals with an array parameter and separate length parameter into closures in the introspected language. https://bugzilla.gnome.org/show_bug.cgi?id=761659
* tests: Add regression test for out array of structPhilip Chimento2016-02-071-0/+32
| | | | | | | This is a regression test for returning out arrays of structs, like gdk_keymap_get_entries_for_keyval() for example. https://bugzilla.gnome.org/show_bug.cgi?id=761658
* tests: Add more regression tests for (not nullable)Philip Withnall2015-11-062-0/+72
| | | | | | | | | | | | On bug #719966, the question arose of whether parameters annotated with (element-type) but not (not nullable) are regarded as nullable or non-nullable. Add some new unit tests to Regress-1.0.gir to check the behaviour is as expected: annotating a parameter with (element-type) implicitly makes it non-nullable (unless also annotated with (nullable)). https://bugzilla.gnome.org/show_bug.cgi?id=757678
* Add support for function typedefs without pointerBen Iofel2015-10-192-0/+55
| | | | | | | | | | g-ir-scanner now supports something like this: typedef void my_callback(int); Notice how my_callback is not a pointer. https://bugzilla.gnome.org/show_bug.cgi?id=755645
* scanner: Fix allow-none on return valuesGarrett Regier2015-09-292-0/+64
| | | | | | | | The optional annotation was being applied which is invalid for return values. https://bugzilla.gnome.org/show_bug.cgi?id=752029 Signed-off-by: Garrett Regier <garrett.regier@riftio.com>
* tests: Add expected files for previous commitColin Walters2015-09-281-0/+32
|
* regress: Add a test for (nullable)Colin Walters2015-09-031-0/+36
| | | | Related to: https://bugzilla.gnome.org/719966
* test: Add a test for GList containing GType.Christoph Reiter2015-07-051-0/+36
| | | | | | See https://bugzilla.gnome.org/show_bug.cgi?id=749696 https://bugzilla.gnome.org/show_bug.cgi?id=751978
* tests: fix make distcheckDieter Verfaillie2015-06-202-0/+61
| | | | | Add missing doc-tool tests, fixes "make distcheck" breakage introduced by 09daa28c5b4625b6f274b3b340bc85e33bef80b5
* scanner: Honor nested types on array declarations as wellColin Walters2014-09-051-0/+18
| | | | | | | | | We have special code to look at (type GLib.List(utf8)), but (type GLib.PtrArray(utf8)) didn't work. This allows NetworkManager to annotate the ActiveConnections property. https://bugzilla.gnome.org/show_bug.cgi?id=733879
* tests: Add regression test for callbacks with an inout arrayGarrett Regier2014-08-072-0/+69
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=702508
* Parse and expose ownership transfer for instance parametersGiovanni Campagna2014-07-031-0/+26
| | | | | | | | | | | Knowing the ownership transfer for instance parameters is necessary for correct memory management of functions which "eat" their instance argument, such as g_dbus_method_invocation_return_*. Parse this information from the gir file and store in the typelib, and then provide new API on GICallableInfo to retrieve this. https://bugzilla.gnome.org/show_bug.cgi?id=729662
* doctool: update testsGiovanni Campagna2014-03-0597-125/+212
|
* g-ir-compiler: Add support for callback fields on GObjectsSimon Feltman2014-02-271-0/+19
| | | | | | | | | | | | | | | | | Use ParseState enum instead of a boolean for the ParseContexts embedded_type flag. This allows specific tracking of the embedded type currently being parsed which can now either be STATE_STRUCT_FIELD or STATE_CLASS_FIELD (or allow for future expansion). Add ParseState::STATE_NONE as the default for this field. Fix GObject FieldBlob validation to take into account the sizeof CallbackBlobs (copied from the struct validator). Add static g_object_info_get_field_offset which parallels g_struct_info_get_field_offset which is needed since callback fields may vary in size. https://bugzilla.gnome.org/show_bug.cgi?id=725198
* doctool: update testsGiovanni Campagna2014-02-26107-116/+1153
|
* scanner: support virtual functions with a typedef-ed callbackGiovanni Campagna2014-02-202-0/+54
| | | | | | | | | | The field of a callback need not be anonymous, it could be a typedef, with a proper Type node. Fixes TelepathyGlib.BaseClient having no virtual functions (and probably others) https://bugzilla.gnome.org/show_bug.cgi?id=723439
* doctool/Gjs: some more fixes for structs and unionsGiovanni Campagna2014-02-2020-328/+4
| | | | | | | | | | | | | | Stop pretending we have fields on unions (only methods are supported). Add minimal support (ie, don't crash) to nested structures, that due to how ast works have namespace None (and the transformers hard-depend on that). Uncovered by GLib's GDoubleIEEE754, before I removed union fields. For some reason, RegressTestStructE (anonymous union) has a completely different behavior and generates a weird name, while RegressLikeGnomeKeyringSchema (array of unnamed structs) becomes array(gpointer). Bah, one should have methods anyway...
* doctool: update reference testsGiovanni Campagna2014-02-20530-7497/+5576
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=724735
* scanner: Don't barf on anonymous unionsColin Walters2013-10-302-0/+50
| | | | | | | | I'd like to be able to use this inside GTK+. See: https://bugzilla.gnome.org/show_bug.cgi?id=711153 https://bugzilla.gnome.org/show_bug.cgi?id=711157
* giscanner: Test fixups for field annotations and documentationStef Walter2013-10-281-0/+25
| | | | Related to: https://bugzilla.gnome.org/show_bug.cgi?id=710561
* giscanner: honor line and paragraph breaks in description fieldsDieter Verfaillie2013-10-083-3/+6
| | | | | | | | | GTK-Doc parameter description fields are allowed to span multiple lines, tag description fields are allowed to span multiple lines and paragraphs. A tool fixing/rewriting GTK-Doc comment blocks in source files would need to have description fields parsed and stored (almost) exactly as they appear in the source file.
* Revert addition of __int128 testsColin Walters2013-05-071-25/+0
| | | | | | | | It's not available on 32 bit architectures, which is a pain for our testing because we can't easily make Regress architecture independent. This reverts commit ca93f8474c9f6ca184d0b5806a4e459ad3dcd132.
* Add expected doc files for previous commitColin Walters2013-05-071-0/+25
|
* tests: add missing expected generated documentationDieter Verfaillie2013-04-222-0/+71
| | | | | | | | a09072bd1f75dfc7497ed599e03e331bff411fd4 introduced new symbols in tests/scanner/regress.[ch] but was missing the expected generated documentation. https://bugzilla.gnome.org/show_bug.cgi?id=698616
* tests: fix a too wide search/replaceDieter Verfaillie2013-04-094-4/+4
| | | | | | Changed by accident in 2df621c53cdffbc3c43c3745947ee859020c8338 https://bugzilla.gnome.org/show_bug.cgi?id=697613