summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* tests/scanner: Add a test for ccompiler.pywip/fanc999/dumper-distutilsChun-wei Fan2015-07-222-0/+81
| | | | | | | | This adds a test for ccompiler.py so that we can test the compiler instance creation via ccompiler.py (and therefore distutils), so that we can get the correct compiler instances as we ask for them. https://bugzilla.gnome.org/show_bug.cgi?id=728313
* test: Add a test for GList containing GType.Christoph Reiter2015-07-057-0/+146
| | | | | | See https://bugzilla.gnome.org/show_bug.cgi?id=749696 https://bugzilla.gnome.org/show_bug.cgi?id=751978
* tests: add missing fixed-size array annotation testsDieter Verfaillie2015-06-291-0/+55
| | | | | | Cases where fixed-size has no value and fixed-size has a non-integer value where not yet tested. Found thanks to coverage.py
* tests: fix commentDieter Verfaillie2015-06-291-1/+1
| | | | | Code uses LOG_COMPILER, comment mistakenly still mentioned TESTS_ENVIRONMENT.
* tests: go through 'env' for all TESTS_ENVIRONMENTDieter Verfaillie2015-06-291-1/+1
| | | | | we already go through 'env' for all other TESTS_ENVIRONMENT statements, reason to not do so here too...
* tests: don't repeat --warn-all --reparse-validate argumentsDieter Verfaillie2015-06-292-2/+1
| | | | | "--warn-all --reparse-validate" is already contained in $(INTROSPECTION_SCANNER_ARGS), no need to repeat
* tests: sync with GTK-Doc test suite @ ↵Dieter Verfaillie2015-06-2410-40/+1229
| | | | | | 02e545371e2132a97458888895cacf57b8c0f83a (2015-06-23) https://bugzilla.gnome.org/show_bug.cgi?id=725685
* tests: make sure g-ir-scanner can find cairo-1.0.girDieter Verfaillie2015-06-242-9/+9
| | | | | | | | | | "cairo-1.0.gir" is generated into "$(top_builddir)/gir" but g-ir-scanner is never instructed to look into that directory. This fails somewhat when there is no system installed copy of it when VPATH building "tests/scanner/Regress-1.0.gir": Couldn't find include cairo-1.0.gir (search path: "everything except the correct value") https://bugzilla.gnome.org/show_bug.cgi?id=745636
* tests: don't add $(top_srcdir)/gir to XDG_DATA_DIRSDieter Verfaillie2015-06-241-1/+0
| | | | | | | | Adding "$(top_srcdir)/gir" to XDG_DATA_DIRS is pointless as scanner/transformer.py actually goes looking for "$(top_srcdir)/gir/gir-1.0", which doesn't exist. https://bugzilla.gnome.org/show_bug.cgi?id=745636
* tests: execute annotationparser tests just onceDieter Verfaillie2015-06-242-40/+7
| | | | | | | | | | | | | | | | | | | | | | | | | 42bb69a6a2f12165a9758b192e80da089e00ab5c introduced a bug causing test_parser.py and test_patterns.py tests to be executed twice. This patch fixes this and still allows the tests to be executed: - using 'make check' - manually: PYTHONPATH=. python tests/scanner/annotationparser/test_parser.py PYTHONPATH=. python tests/scanner/annotationparser/test_patterns.py - individually: python -m unittest test_parser.TestGiTag_Stability.test_001 python -m unittest test_patterns.TestCommentAsterisk.test_000 test_parser.py now results in: Ran 360 tests in 0.172s instead of: Ran 720 tests in 0.339s test_patterns.py now results in: Ran 213 tests in 0.014s instead of Ran 426 tests in 0.041s https://bugzilla.gnome.org/show_bug.cgi?id=745636
* tests: remove unused test filesDieter Verfaillie2015-06-242-1534/+0
| | | | | | | libfoo was moved into libregress in 9fc6eb16e954559d97cdd9a03437c8b1877c2a1d libtestinherit was moved into libregress in bb1ac9cf2dc450c5d44b1e39e3162ba06069f4a1 https://bugzilla.gnome.org/show_bug.cgi?id=745636
* tests: Python 3 fixesDieter Verfaillie2015-06-242-2/+2
| | | | | | | | tests/scanner/annotationparser/test_[parser|patterns].py stopped working with Python3 somewhere down the line due to the iteritems() call... https://bugzilla.gnome.org/show_bug.cgi?id=745636
* girepository: Support GError exceptions on callbacksGarrett Regier2015-06-211-0/+81
| | | | | | | | | | | Generalize "throws" attribute to SignatureBlob which can be used by all callable blob types. Keep FunctionBlob and VFuncBlob throw attributes around and functional for compatibility. Refactor girwriter.c to write out throws attribute for all callable types. Based on a patch by Simon Feltman. https://bugzilla.gnome.org/show_bug.cgi?id=729543
* tests: Convert gitestthrows to use GTest frameworkGarrett Regier2015-06-211-6/+12
| | | | Based on a patch by Simon Feltman.
* girepository: Add g_struct_info_find_field()Garrett Regier2015-06-212-2/+64
| | | | | | | | | | | Add find_field utility function for finding a field info by name. Beyond convenience, this should be faster than manually using the get_n_fields and get_field functions because get_field does an additional iteration for each field to calculate offsets O(n^2). Thus find_field combines the offset and comparison computations into a single loop O(n). Based on a patch by Simon Feltman.
* tests: fix make distcheckDieter Verfaillie2015-06-208-0/+204
| | | | | Add missing doc-tool tests, fixes "make distcheck" breakage introduced by 09daa28c5b4625b6f274b3b340bc85e33bef80b5
* Add deprecation guards for GSimpleAsyncResult deprecationChristoph Reiter2015-06-191-0/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=751150
* tests: Add regression test for (transfer full) returning callbacksDebarshi Ray2015-06-182-0/+22
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=750286
* scanner: Add --symbol-filter-cmdGarrett Regier2015-04-204-0/+107
| | | | | | | | | | Add the command line flag --symbol-filter-cmd to g-ir-scanner which allows running symbol names through a filtering shell command. The symbol is sent as stdin to the filter command and expects a filtered result written to stdout. https://bugzilla.gnome.org/show_bug.cgi?id=744534 Signed-off-by: Garrett Regier <garrett.regier@riftio.com>
* scanner: allow multiline annotationsDieter Verfaillie2015-04-184-44/+629
| | | | | | | Allow `identifier`, `parameter` and `tag` part `annotations` fields to span multiple lines https://bugzilla.gnome.org/show_bug.cgi?id=676133
* Makefile.introspection: pass CC to scannerDieter Verfaillie2015-04-182-4/+6
| | | | | | Extends commit 92d9c38 to also pass CC to g-ir-scanner. https://bugzilla.gnome.org/show_bug.cgi?id=700066
* 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