summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* giscanner: enable the --reparse-validate option for our test suiteDieter Verfaillie2015-03-041-1/+1
| | | | | | | | | | Doing so reveals GIRParser did not yet support: - the (skip) annotation on parameters and return values - the (attributes) annotation This patch fixes both issues an prevents further similar problems. https://bugzilla.gnome.org/show_bug.cgi?id=738171
* scanner: allow (array zero-terminated) instead of (array zero-terminated=1)Dieter Verfaillie2015-03-035-28/+25
| | | | | | | | | | | | | | What we already had: - (array zero-terminated=1) > array which is NULL terminated - (array zero-terminated=0) > array which is not NULL terminated - (array) > array which is not NULL terminated - (array zero-terminated=X) > array which is not NULL terminated where X can be anything What this patch adds: - (array zero-terminated) > array which is NULL terminated https://bugzilla.gnome.org/show_bug.cgi?id=657754
* gimarshallingtests: Don't unconditionally include config.hintrigeri2015-02-131-0/+3
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=738989
* Don't unconditionally include config.h in regress.cMatthias Clasen2014-10-101-0/+3
| | | | | | | This is an installed file, so we can't assume that config.h will be around. https://bugzilla.gnome.org/show_bug.cgi?id=737275
* tests: Change names with case-only distinctionPhilip Chimento2014-10-013-5/+5
| | | | | | | | | | | | | | | | | | RegressIntSet and RegressIntset, aliases of one another, were causing two documentation pages to be built by the documentation tests that were named identically except for letter case. On OSX and Windows, the most common filesystems are case-insensitive, and those two files can't exist in the same directory on case- insensitive filesystems. That caused the tests to fail. It also caused problems when checking out the repository, because the expected documentation set also contains those files. This commit fixes the symptom (so that JHbuild will stop erroring out on this module) but not the problem of generating a documentation set for two identifiers which differ (perfectly legally) only by case. https://bugzilla.gnome.org/show_bug.cgi?id=725264
* scanner: Honor nested types on array declarations as wellColin Walters2014-09-056-1/+69
| | | | | | | | | 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/Makefile.am: Update Generation of everything.[c|h]Chun-wei Fan2014-09-041-2/+7
| | | | | | | | | Make use of the new options in codegen.py/testcodegen.py so that the symbols in the generated everything.[c|h] can be annotated for export, and the necessary headers to facilitate the compile-time symbol exporting can be included appropriately. https://bugzilla.gnome.org/show_bug.cgi?id=732669
* tests: Export the Symbols from the Offsets TestsChun-wei Fan2014-09-033-3/+8
| | | | | | | | Like the other test programs, include config.h before anything and decorate the lone symbols for export, and include $(top_srcdir)/tests so that gitestmacros.h can be found and used. https://bugzilla.gnome.org/show_bug.cgi?id=732669
* tests: Fix annotation for int8_outMatijs van Zuijlen2014-08-151-2/+2
| | | | | | | The annotation for gi_marshalling_tests_object_int8_out used the wrong function name, causing the annotation not to be picked up. https://bugzilla.gnome.org/show_bug.cgi?id=727665
* build: Export Symbols Using Compiler DirectivesChun-wei Fan2014-08-152-2/+2
| | | | | | | | | | | Use compiler directives for exporting symbols for the build of libgirepository and also for the test libraries, like what is now done in GLib and GTK+ so that maintaining a separate .symbols (and .def files) would not be needed, in which the correct compiler directive is determined during configure time. Drop all the .def files and the .symbols file as we would not be using them anymore. https://bugzilla.gnome.org/show_bug.cgi?id=732669
* tests/scanner: Decorate Symbols for ExportChun-wei Fan2014-08-1522-1/+752
| | | | | | | | | | This updates the test headers and sources to decorate the symbols with the macro that can be used to export the symbols, and include config.h first in the c-sources so that the macro can be defined with the compiler directive to export the symbols. Update the CFLAGS as well so that the header that defines the export decoration macro can be found. https://bugzilla.gnome.org/show_bug.cgi?id=732669
* tests/: Decorate Symbols for ExportChun-wei Fan2014-08-152-0/+747
| | | | | | | | | This updates the test headers and sources to decorate the symbols with the macro that can be used to export the symbols, and include config.h first in the c-sources so that the macro can be defined with the compiler directive to export the symbols. https://bugzilla.gnome.org/show_bug.cgi?id=732669
* tests: Add a Header for Symbol ExportingChun-wei Fan2014-08-152-2/+14
| | | | | | | | | | This adds a header under tests/ that can be included by the various test libraries/sources so that symbols from them can be decorated by a macro, which can then be used to export symbols by using a compiler directive, like the updates to girepository. This header is also installed as the test headers refer to them. https://bugzilla.gnome.org/show_bug.cgi?id=732669
* tests/repository: Drop Unneeded IncludesChun-wei Fan2014-08-133-3/+0
| | | | | | | unistd.h is not universally available, and dropping that include did not seem to cause any warnings or errors, and did not affect the tests running. https://bugzilla.gnome.org/show_bug.cgi?id=734640
* Update Regress-1.0-sections-expected.txtSimon Feltman2014-08-071-0/+1
| | | | | | Update based additional test added with commit e2b96aaa4 https://bugzilla.gnome.org/show_bug.cgi?id=702508
* tests: Add regression test for callbacks with an inout arrayGarrett Regier2014-08-079-0/+283
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=702508
* tests: Add constructor with an error argumentGarrett Regier2014-08-072-0/+14
| | | | | | Make sure a constructor that sets a GError works correctly. https://bugzilla.gnome.org/show_bug.cgi?id=727004
* Parse and expose ownership transfer for instance parametersGiovanni Campagna2014-07-038-0/+154
| | | | | | | | | | | 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
* build: Fix distcheck after addition of identifier filteringSimon Feltman2014-06-031-1/+2
| | | | | Add missing identfilter.py to EXTRA_DIST and correct spelling of Identfilter-1.0-expected.gir.
* scanner: Add --identifier-filter-cmdSimon Feltman2014-06-035-1/+152
| | | | | | | | | Add the command line flag --identifier-filter-cmd to g-ir-scanner which allows running identifier names through a filtering shell command. The identifier is sent as stdin to the filter command and expects a filtered result written to stdout. https://bugzilla.gnome.org/show_bug.cgi?706898
* gimarshallingtests: Correctly retrieve param spec's value typeMatijs van Zuijlen2014-05-301-1/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=728409
* tests: fix Regress expected outputRyan Lortie2014-05-071-2/+11
| | | | | Now that Cancellable and AsyncReadyCallback are being correctly recognised again, adjust the expected output of the Regress testcase.
* Revert "giscanner: don't accept (allow-none) on Returns:"Ryan Lortie2014-05-065-38/+35
| | | | | | | This reverts commit 0839e696e9fbc1942ac5c61054de3b47e9578152. This was accidentally picked up by my 'git bz apply' against the bug as I was getting ready to push the last set of changes.
* giscanner: write nullable and optional attributesRyan Lortie2014-05-061-18/+62
| | | | | | | | | | | | | | | | | | | Record our internal 'nullable' and 'optional' attributes into the written .gir file. It is now theoretically possible to express the concept of an out parameter with a nullable type (although presently there is no way to do this). Modify our own internal parser (in the scanner) to understand the newly-written attributes. Update the expected output of the 'Regress-1.0.gir' test to account for the new attributes. Nothing else understands 'nullable' yet, but the girparser in the typelib compiler already understands 'optional' and records a bit for it in the typelib. https://bugzilla.gnome.org/show_bug.cgi?id=660879
* giscanner: don't accept (allow-none) on Returns:Dieter Verfaillie2014-05-065-35/+38
| | | | | | | | | The old annotationparser.py happily parsed this, but giscanner/girwriter.py never serialized an allow-none attribute to the .gir file and girepository/girparser.c never looked for an allow-none attribute either. https://bugzilla.gnome.org/show_bug.cgi?id=660879
* tests: add implementation of an interfaceLionel Landwerlin2014-04-112-0/+66
| | | | | | | The implementation as a method returning itself as its implemented interface type. https://bugzilla.gnome.org/show_bug.cgi?id=727824
* doctool: update testsGiovanni Campagna2014-03-05107-150/+304
|
* tests: Fix function pointer prototype in regress.hSimon Feltman2014-03-031-1/+1
| | | | | This was causing a "warning: function declaration isn't a prototype" with strict-prototypes enabled.
* tests: Add missing regress documentation test pageSimon Feltman2014-03-021-0/+14
| | | | | | Add missing page needed for tests to run after commit 7027bb256 https://bugzilla.gnome.org/show_bug.cgi?id=725198
* g-ir-compiler: Add support for callback fields on GObjectsSimon Feltman2014-02-276-0/+88
| | | | | | | | | | | | | | | | | 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-26177-314/+1593
|
* maintransformer: don't pair methods if the symbol prefix does not match with ↵Giovanni Campagna2014-02-263-0/+42
| | | | | | | | | | | a final underscore In cases like g_resources_register() and gdk_events_get_angle(), the c_symbol_prefix of the first parameter (resp. g_resource and gdk_event) is a prefix of the symbol, but the next character is not _, so that should not be considered a method. For backward compatibility reasons, we still generate one, but then it's not included in the documentation (because of moved_to)
* scanner: support virtual functions with a typedef-ed callbackGiovanni Campagna2014-02-2013-0/+364
| | | | | | | | | | 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-201687-20049/+15904
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=724735
* gi-tester: Don't use negative substring parametersDavide Bertola2014-02-131-1/+3
| | | | Bash from OSX 10.9 seems not to support them.
* Add test passing an owned boxed structure to a callbackMike Gorse2014-01-272-0/+30
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=722899
* tests: Switch two more uses to LOG_COMPILER to fix parallel-testsColin Walters2014-01-252-3/+2
| | | | | | This is similar to previous commits; we need to use LOG_COMPILER in order for Automake's parallel-tests framework to work. It's not allowed to include binaries in TESTS_ENVIRONMENT anymore.
* regress: Fix regress_test_torture_signature_2() to actually call the callbackMartin Pitt2014-01-141-0/+1
| | | | This provides a test case for https://bugzilla.gnome.org/show_bug.cgi?id=722104
* scanner: Replace GInitiallyUnowned field sharing with generic solutionSimon Feltman2014-01-041-4/+4
| | | | | | | | | | | | Remove GInitiallyUnowned special case in gdumpparser where fields are copied from GObject. Add generic solution where anytime we have multiple typedef structs, the fields become shared: typedef struct _Foo Foo; typedef struct _Foo Bar; struct _Foo {...}; https://bugzilla.gnome.org/show_bug.cgi?id=581525
* scanner: Fix parsing for various typedef struct orderingsSimon Feltman2014-01-042-4/+0
| | | | | | | | | Add structs parsed from C's "tag namespace" into their own cache for lookup by typdef parsing. This fixes issues where a typedef declared after a struct would not have a correct name. This also cleans up the need for special casing struct tags prefixed with an underscore. https://bugzilla.gnome.org/show_bug.cgi?id=581525
* tests: Remove debug echo from gi-testerSimon Feltman2014-01-041-1/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=721477
* tests: Update GI to use parallel test harnessSimon Feltman2014-01-044-7/+6
| | | | | | | | There was some dependence on the serial test harness in the recent tests that were added. Update GI to use the parallel test harness to avoid incompatibilities. https://bugzilla.gnome.org/show_bug.cgi?id=721477
* tests: Add transformer tests for callback typedefsSimon Feltman2014-01-021-0/+16
| | | | | | Add a basic transformer unittest for callback typedefs. https://bugzilla.gnome.org/show_bug.cgi?id=581525
* tests: Add nested union unittestsSimon Feltman2014-01-021-0/+85
| | | | | | | Add a sub-set of tests found in struct testing as only basic validation is needed due to the shared code paths. https://bugzilla.gnome.org/show_bug.cgi?id=581525
* tests: Add nested struct tests for transformerSimon Feltman2014-01-021-0/+107
| | | | | | Add tests for nested structs as they pass through the transformer. https://bugzilla.gnome.org/show_bug.cgi?id=581525
* tests: Add transformer typedef struct testsSimon Feltman2014-01-022-1/+243
| | | | | | | | | Add tests for various combinations of struct tags and typedefs. This includes tests for orderings of a typedef prior to struct definition, reversed, all in one, and multiple typdefs. The currently failing tests have been marked as "expectedFailure" so the test suite doesn't bail out. https://bugzilla.gnome.org/show_bug.cgi?id=581525
* scanner: Fix get_symbols/comments to maintain the scanner listsSimon Feltman2014-01-022-1/+46
| | | | | | | | | | | | Use g_slist_copy prior to returning the lists run through g_slist_reverse. This preserves the source scanners internally held lists where previously they would only point to a single element after a call, leaking memory and breaking subsequent calls. Note the functions as (transfer container) and use g_slist_free after calls in the Python bindings. Add new unittest file: test_sourcescanner.py for isolated unittesting of the SourceScanner. https://bugzilla.gnome.org/show_bug.cgi?id=581525
* tests: Add tests for various struct typedef combinationsSimon Feltman2014-01-024-0/+258
| | | | | | | | | Add functional blackbox tests typedefs.[h|c] for various struct typedef orderings. Use XFAIL_TESTS with the new Typedefs-1.0.gir target. This allows for a differing expected gir that does not cause the suite to fail but rather a goal to work towards. https://bugzilla.gnome.org/show_bug.cgi?id=581525
* tests: Use Automake test harness for tests/offsetsSimon Feltman2014-01-021-10/+13
| | | | | | | | Replace usage of check-local with the Automake test harness. Change check_ variable usage to EXTRA_ in order to avoid building these dependencies with targeted testing using TESTS= in parent directories. https://bugzilla.gnome.org/show_bug.cgi?id=720713