summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* giscanner: Create AST nodes for SECTION: doc blocks; add a GIR nodedoc-sectionsJasper St. Pierre2014-06-102-0/+30
| | | | | These will eventually be paired with the sections file parser to create a set of sections.
* 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
* tests: Update Python stanza to change directories before running testsSimon Feltman2014-01-021-3/+5
| | | | | | | | Ensure PYTHONPATH uses absolute paths for top_builddir and top_srcdir. Use pushd/popd before and after running tests with "python -m unittest...". This ensures TESTARGS can be used from within a vpath build directory. https://bugzilla.gnome.org/show_bug.cgi?id=720713
* tests: Use Python unittest module parameterization for annotationparserSimon Feltman2013-12-293-59/+83
| | | | | | | | | | | | | | Add Python unittest module parameterization support to gi-tester through the use of a "TESTARGS" variable. Use the Automake test harness along with gi-tester for running the Python annotationparser tests. Add tests/scanner/annotationparser/Makefile.am and localize testing rules and EXTRA_DIST setup to this file. Specific Python tests can now be run as follows: cd tests/scanner/annotationparser make check TESTS=test_patterns.py TESTARGS=TestTagValueStability https://bugzilla.gnome.org/show_bug.cgi?id=720713
* tests: Refactor test_parser and test_patterns to use unittest.TestSuiteSimon Feltman2013-12-292-50/+119
| | | | | | | | | | | | | Update both test_parser.py and test_patterns.py to dynamically generate TestCase sub-classes rather than modify a statically defined one. Use unittest.TestSuite to queue up the generated test cases via the "load_tests" hook. Use underscores instead of periods as a seperator for dynamically generated test cases and methods to match Python identifiers. Beyond general cleanup, these changes will help the ability to specify Python tests individually. https://bugzilla.gnome.org/show_bug.cgi?id=720713
* tests: Use Automake test harness for warning testsSimon Feltman2013-12-292-13/+4
| | | | | | | | | | Update warning tests to use the Automake test harness per-header file check. This allows for quicker more granular testing, for example: cd tests/warn make check TESTS=return-gobject.h https://bugzilla.gnome.org/show_bug.cgi?id=720713
* tests: Use EXTRA_LTLIBRARIES instead of check_LTLIBRARIESSimon Feltman2013-12-293-6/+13
| | | | | | | | Update tests/Makefile.am and tests/scanner/Makefile.am to use EXTRA_LTLIBRARIES which minimizes the building of libraries to only dependencies of specific tests when using: make check TESTS="..." https://bugzilla.gnome.org/show_bug.cgi?id=720713
* tests: Use Automake test harness for scanner diff testsSimon Feltman2013-12-294-21/+72
| | | | | | | | | | | | | | | | | | | Add gi-tester script for dispatching various scanner diff tests based on their target suffix. Hook the dispatcher script into the Automake test harness which is passed the diff test target name. Remove usage of check-local which is always run regardless of whether or not the TESTS variable is set from the command line. This allows for both the ability to use the harnesses XFAIL_TESTS variable for expected failures as well as testing of targets individually, for example: cd tests/scanner make check TESTS=GtkFrob-1.0.gir make check TESTS=Regress-1.0-Python Add Headeronly-1.0-expected.gir for validating the results of the header only gir creation test. https://bugzilla.gnome.org/show_bug.cgi?id=720713
* scanner: Support boolean constantsFlorian Müllner2013-11-292-0/+4
| | | | | | | | Aliasing TRUE or FALSE is not very common, but done occasionally for extra clarity. Namely G_SOURCE_REMOVE / G_SOURCE_CONTINUE are self-explanatory, unlike the "raw" booleans. https://bugzilla.gnome.org/show_bug.cgi?id=719566
* scanner: Don't barf on anonymous unionsColin Walters2013-10-308-0/+182
| | | | | | | | 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-283-0/+51
| | | | Related to: https://bugzilla.gnome.org/show_bug.cgi?id=710561
* giscanner: Include field documentationStef Walter2013-10-281-0/+3
| | | | | | Structure field documentation was not being included in the gir file. https://bugzilla.gnome.org/show_bug.cgi?id=710562
* giscanner: Correctly consume field annotations on structsStef Walter2013-10-283-0/+54
| | | | | | | | A hidden exception was being thrown (which we now log), due to fields being treated as function parameters. Fixed to make field array annotations be transformed and written out to the gir correctly. https://bugzilla.gnome.org/show_bug.cgi?id=710561
* giscanner: Respect __GI_SCANNER__ when scanning for macrosStef Walter2013-10-212-0/+22
| | | | | | | | | When scanning for macros respect ifdefs of __GI_SCANNER__ in the various header files. Only #ifdef and #ifndef are supported. If __GI_SCANNER__ appears in plain #if statements, a warning is printed. https://bugzilla.gnome.org/show_bug.cgi?id=698367
* tests: Fix memory leaks in transfer full/container inout testsSimon Feltman2013-10-101-0/+12
| | | | | | | Make sure to call the various free functions for container tests where inout arguments are marked transfer full or container. https://bugzilla.gnome.org/show_bug.cgi?id=709796
* tests: interesting annotationparser test caseDieter Verfaillie2013-10-091-0/+167
| | | | | | | | | GTK-Doc has trouble parsing multiline parameter description fields if the first word of a continuation line is "returns". We're already doing the right thing but make sure we continue to do so in the future https://bugzilla.gnome.org/show_bug.cgi?id=708445
* tests: prevent warnings with some make implementationsDieter Verfaillie2013-10-091-8/+4
| | | | | | some make implementations don't like empty $(AM_V_GEN) rule commands, see http://lists.gnu.org/archive/html/bug-coreutils/2009-04/msg00251.html for more info.
* giscanner: write '<varargs/>' instead of '<varargs></varargs>'Dieter Verfaillie2013-10-082-8/+4
|
* giscanner: fix c0e748e1cdf8cf0803266f94c3c5ad154df504a8Dieter Verfaillie2013-10-081-0/+2
| | | | | | | | | | | When encountering /**/ in the source, parse_gtk_doc_comment() would be executed (due to the /** part starting a GTK-Doc comment block) and would happily consume the / and everything up until the next comment block was closed or EOF, thus consuming a whole block of C code... Encoutered in the wild here: https://git.gnome.org/browse/clutter-gst/tree/clutter-gst/clutter-gst-player.c?id=03f0d8f48bd7f60e582e6185cb73a07038e8d55d#n1926