summaryrefslogtreecommitdiff
path: root/tests/methods
Commit message (Collapse)AuthorAgeFilesLines
* tests: Rename colliding test cases to avoid conflictsRico Tzschichholz2021-11-262-0/+68
|
* tests: Add [Profile] method test to increase coverageRico Tzschichholz2021-11-242-0/+133
|
* codegen: Emit constants without initializer list in defines sectionRico Tzschichholz2021-11-071-1/+1
| | | | Fixes https://gitlab.gnome.org/GNOME/vala/issues/440
* vala: Add support for nested methods (local functions)Rico Tzschichholz2021-10-302-0/+237
| | | | Fixes https://gitlab.gnome.org/GNOME/vala/issues/1232
* vala: Parameter following ellipsis parameter is not allowedwxx2021-10-141-0/+7
| | | | Fixes https://gitlab.gnome.org/GNOME/vala/issues/1237
* vala: Multi-dimensional params-array not allowedRico Tzschichholz2021-09-221-0/+7
| | | | Fixes https://gitlab.gnome.org/GNOME/vala/issues/1230
* codegen: Add type declaration for implicit temporary local variableRico Tzschichholz2021-09-181-0/+2
|
* tests: Add expected generated C sourcesRico Tzschichholz2021-07-1670-0/+23071
|
* vala: Parameter following params-array parameter is not allowedRico Tzschichholz2021-05-261-0/+7
| | | | Fixes https://gitlab.gnome.org/GNOME/vala/issues/1183
* codegen: Free intermediate temp-variables of postcondition expressionRico Tzschichholz2021-03-092-0/+25
| | | | | | and not clearing "temp_ref_values" caused invalid references later. Fixes https://gitlab.gnome.org/GNOME/vala/issues/80
* codegen: "_first_array" parameter for params-array is variadic tooRico Tzschichholz2021-03-041-0/+57
| | | | | Not following this resulted in mismatching signature assumptions between caller and callee if the callable throws an error.
* tests: Don't leak array if length is -1Rico Tzschichholz2021-02-041-0/+3
| | | | Found by -fsanitize=address
* codegen: Handle NoWrapper attribute of interface methods on caller sideRico Tzschichholz2021-01-301-0/+15
|
* vala: NoWrapper methods must be declared abstract or virtualRico Tzschichholz2021-01-301-0/+10
|
* Add further support for params arrays in constructorsRico Tzschichholz2021-01-281-0/+45
| | | | | | In addition to 98ab3da89640b8b8a6c67044b4df1194672774bb See https://gitlab.gnome.org/GNOME/vala/issues/128
* vala: Avoid critical when trying to use symbol_reference of ElementAccessOle André Vadla Ravnås2021-01-221-0/+10
| | | | Regression of 6e7be51cb5455e9c5c721d4ba5121a6ab04673dd
* codegen: Don't leak memory of already assigned out-parameter on errorRico Tzschichholz2020-12-311-0/+39
| | | | Fixes https://gitlab.gnome.org/GNOME/vala/issues/1123
* tests: Add more "delegate" tests to increase coverageRico Tzschichholz2020-11-142-0/+51
|
* codegen: Update outdated array _size_ variable of captured local-variableRico Tzschichholz2020-10-221-0/+18
| | | | Fixes https://gitlab.gnome.org/GNOME/vala/issues/1090
* codegen: Check param for null before using itRico Tzschichholz2020-07-221-0/+14
| | | | | | | | | | Regression of 5490b0b21a4089d803d51c91311430d60d266f7b This caused criticals like: vala_get_ccode_array_length: assertion 'node != NULL' failed See https://gitlab.gnome.org/GNOME/vala/issues/929
* tests: Fix "methods/extern" test with -Werror=address and gcc 5.4.0Rico Tzschichholz2020-07-171-3/+3
|
* tests: Add "named argument" test to increase coverageRico Tzschichholz2020-06-261-0/+22
|
* vala: Improve parameter check of "get" method meant to be used by foreachRico Tzschichholz2020-06-261-0/+45
| | | | | | | The index-based iteration requires the "get" method to take one integer compatible parameter. Otherwise continue checking other options. Fixes https://gitlab.gnome.org/GNOME/vala/issues/1017
* vala: Use correct value-type for ArrayCreationExpression used as argumentRico Tzschichholz2020-06-151-0/+20
| | | | | | Copy fixed_length and inline_allocated attributes from formal-target-type. Fixes https://gitlab.gnome.org/GNOME/vala/issues/1009
* vala: params-array parameter is not allowed in abstract/virtual methodRico Tzschichholz2020-05-051-0/+8
| | | | Fixes https://gitlab.gnome.org/GNOME/vala/issues/985
* tests: Drop usage of "--main main" and avoid ambigious entry-pointsRico Tzschichholz2020-03-221-5/+0
|
* codegen: Improve handling of "array_length_type" attributeRico Tzschichholz2020-03-171-0/+156
| | | | | | This affects methods, parameters, field and properties. Fixes https://gitlab.gnome.org/GNOME/vala/issues/938
* codegen: Correctly access captured parameter in precondition of methodRico Tzschichholz2020-03-131-0/+35
| | | | Fixes https://gitlab.gnome.org/GNOME/vala/issues/144
* codegen: Emit postconditions before free'ing local variablesRico Tzschichholz2020-03-131-0/+51
| | | | It was possible to cause segmentation-faults or use-after-free errors.
* codegen: Reset outdated array _size_ variable after use as ref parameterRico Tzschichholz2020-03-121-0/+11
| | | | Fixes https://gitlab.gnome.org/GNOME/vala/issues/929
* codegen: Actually respect "delegate_target" attribute of method/parameterRico Tzschichholz2020-03-081-0/+105
|
* Add further support for params arraysRico Tzschichholz2020-01-151-0/+42
| | | | | | | | | | | This brings support for params-arrays in normal vala source code. The parameter is a null-terminated array which is represented as variadic parameter in generated C. This feature is considered experimental for now. Fixes https://gitlab.gnome.org/GNOME/vala/issues/128
* codegen: Fix precondition in creation method of structsRico Tzschichholz2019-11-261-0/+27
|
* vala: Add a basic parameter check for [Print] methodsRico Tzschichholz2019-11-212-0/+51
| | | | | | and add tests to increase coverage Introdruced with ea8cd97480a7a560cfd8ae3f060f63638b7d9de4
* tests: Extent "post-condition" virtual method test to increase coverageRico Tzschichholz2019-10-171-0/+20
|
* codegen: Allow passing/retrieving any delegate to/from varargs parameterRico Tzschichholz2019-10-031-0/+30
| | | | | | | | Initialize target/notify cvalues of delegate-typed arguments/result of inferred varargs parameters and va_list.arg() calls. Only the actual function pointer will be passed or retrieved. The target and destroy values will be null.
* tests: Add dedicated "delegate without target through varargs" testRico Tzschichholz2019-10-031-0/+31
|
* tests: Extent "post-condition" creation method test to increase coverageRico Tzschichholz2019-09-241-0/+6
|
* tests: Extend "pre- and post-condition" test to increase coverageRico Tzschichholz2019-08-291-0/+20
|
* vala: Init formal_target_type of ArrayCreationExpr from InitializerListRico Tzschichholz2019-08-161-0/+14
| | | | | | | formal_target_type is expected to be set when inferring generic type parameters. Fixes https://gitlab.gnome.org/GNOME/vala/issues/835
* codegen: Real structs are allowed by simple generics and passed as referenceRico Tzschichholz2019-07-082-0/+50
| | | | | | Add the required pointer-indirections to fix invalid memory accesses. Fixes https://gitlab.gnome.org/GNOME/vala/issues/819
* codegen: Assign GValue result of function calls to temp-var on copy_valueRico Tzschichholz2019-07-051-0/+15
| | | | | | Regression of a94a28141e1f222d1da7e72bea4cd2d1e5242f41 Fixes https://gitlab.gnome.org/GNOME/vala/issues/819
* codegen: Don't write declaration of extern symbols with given headerRico Tzschichholz2019-07-041-0/+31
| | | | | | | | | | | The corresponding header will provide the declaration and therefore fix build with -Werror=redundant-decls. Set cheader_filename for implicit to_string() method of enums which is transformed into symbol calls from glib-object.h. This avoids the leak of an superfluous prototype of that method into the generated c code. Fixes https://gitlab.gnome.org/GNOME/vala/issues/745
* tests: Add "method ccode return-type" test to increase coverageRico Tzschichholz2019-03-101-0/+14
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=699956
* tests: Extent "post-condition" method test to increase coverageRico Tzschichholz2019-03-011-0/+16
|
* codegen: Use temp-vars for ellipsis out-arguments to fix memory managementRico Tzschichholz2018-12-261-0/+43
| | | | Fixes https://gitlab.gnome.org/GNOME/vala/issues/722
* vala: Don't just guess and check for a matching base_interface_method tooRico Tzschichholz2018-12-201-3/+7
| | | | | | | | | | | | This fixes class with multiple interfaces which require implementations of methods with conflicting naming while the explicit interface-type reference is not present yet. Extend the present test-case for runtime checking. This will still silently connect matching base-class methods as before as introduced in e1a3ff9470763e7c6ff5a887036390bd418f4e46 Fixes https://gitlab.gnome.org/GNOME/vala/issues/548
* vala: Copy CCode instance_pos argument from virtual/abstract base methodsRico Tzschichholz2018-11-081-0/+38
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=540483
* tests: Add more "method" tests to increase coverageRico Tzschichholz2018-08-011-0/+19
|
* tests: Add more invalid class tests to increase coverageRico Tzschichholz2018-06-131-1/+6
|