summaryrefslogtreecommitdiff
path: root/tests/basic-types
Commit message (Collapse)AuthorAgeFilesLines
* codegen: Stabilize CCode.cname for backing method of lamdba expressionRico Tzschichholz2023-04-061-22/+22
| | | | Move lambda_id generation to CCodeAttribute and use _vala_lambda%d_ pattern
* vala: Correctly handle pre/post-increment expression as index of element accessRico Tzschichholz2023-03-081-9/+5
| | | | | | Regression of cb1828cfc5273aca752de9b39a77e0cd53305e61 Fixes https://gitlab.gnome.org/GNOME/vala/issues/1417
* Require and target GLib >= 2.56Rico Tzschichholz2023-02-282-215/+253
| | | | | | | The next stable release of vala will happen over 5 years after the release of GLib 2.56.0. Fixes https://gitlab.gnome.org/GNOME/vala/issues/1415
* vala: Add support for Hexadecimal floating point literalswszqkzqk2023-01-302-0/+101
| | | | https://gcc.gnu.org/onlinedocs/gcc/Hex-Floats.html#Hex-Floats
* vala: Improve missing exponent check for real literalsRico Tzschichholz2023-01-302-0/+10
|
* glib-2.0: Improve string.replace()wszqkzqk2023-01-301-62/+42
| | | | | | Use string.split() and string.joinv() which is way faster than GLib.Regex() Fixes https://gitlab.gnome.org/GNOME/vala/issues/1402
* tests: Extend string.replace() test to increase coverageRico Tzschichholz2023-01-182-0/+20
|
* tests: Update c-expectedwszqkzqk2023-01-1133-33/+33
|
* codegen: Correctly handle fixed-length array initialization of fields in classesRico Tzschichholz2023-01-041-0/+2
|
* tests: Add "string relation" tests to increase coverageRico Tzschichholz2022-12-222-0/+48
|
* vala: Add support for binary/octal integer literal星外之神2022-12-0811-0/+147
|
* vala: Improve integer literal checksRico Tzschichholz2022-12-085-0/+25
|
* codegen: Add glib.h include for TRUE/FALSE literalRico Tzschichholz2022-10-022-0/+28
| | | | Fixes https://gitlab.gnome.org/GNOME/vala/issues/1364
* codegen: Emit GType definition for error domainsRico Tzschichholz2022-02-241-0/+25
| | | | Fixes https://gitlab.gnome.org/GNOME/vala/issues/699
* codegen: Emit G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC() for structsRico Tzschichholz2022-02-244-0/+5
| | | | Fixes https://gitlab.gnome.org/GNOME/vala/issues/1293
* codegen: Write array length of formal parameters with fixed lengthRico Tzschichholz2022-01-262-35/+57
| | | | "void foo (gint i[3]) { ... }" instead of "void foo (gint* i) { ... }"
* vala: Transform assignment of an array element as neededwxx2022-01-262-0/+130
| | | | | Fixes https://gitlab.gnome.org/GNOME/vala/issues/889 Fixes https://gitlab.gnome.org/GNOME/vala/issues/1258
* glib-2.0: Fix criticals in string.joinv() with arrays that start with nullNahuel Gomez2022-01-252-37/+63
|
* vala: Add foreach statement support for GLib.ArrayPrinceton Ferro2022-01-242-0/+222
| | | | It is now possible to use foreach with a GLib.Array
* codegen: Access of inline allocated array is guaranteed to be non nullRico Tzschichholz2022-01-231-5/+5
| | | | | | | | and improve null check for container in slice expression Found by -Werror=address with GCC 12 See https://gitlab.gnome.org/GNOME/vala/issues/1282
* codegen: Use __once instead of __volatile in generated codeVal Och2022-01-0313-84/+84
| | | | | This better reflects purpose of relevant variables, especially given that they aren't volatile anymore on GLib 2.68+.
* codegen: Initialize "result" variable on declaration for abstract methods onlyRico Tzschichholz2022-01-0316-53/+53
|
* codegen: Use a dedicated EmitContext for _variant_get*() functionsRico Tzschichholz2021-12-133-493/+493
|
* vala: NullLiteral is not a valid argument for string concatenationwxx2021-12-083-0/+24
| | | | Fixes https://gitlab.gnome.org/GNOME/vala/issues/1260
* codegen: Drop inconsistent space for ObjectType parametersRico Tzschichholz2021-11-272-8/+8
|
* codegen: Emit constants without initializer list in defines sectionRico Tzschichholz2021-11-074-5/+7
| | | | Fixes https://gitlab.gnome.org/GNOME/vala/issues/440
* tests: Split "Variant (de)serialization" test to trigger one error at a timeRico Tzschichholz2021-10-183-12/+12
|
* codegen: Actually free data when using "remove(_all)" on GLib.Queue/(S)ListRico Tzschichholz2021-10-152-0/+690
| | | | | | | | | | When using e.g. GLib.List.remove() there is no context/feedback whether an item was removed or needed manual free'ing. Replace such calls with custom wrappers where items required free'ing if they were found. Fixes https://gitlab.gnome.org/GNOME/vala/issues/1238
* tests: Add "integer/float literal" tests to increase coverageRico Tzschichholz2021-09-294-0/+136
|
* vala: Don't restrict element type of GLib.ArrayRico Tzschichholz2021-09-152-0/+89
| | | | Fixes https://gitlab.gnome.org/GNOME/vala/issues/1227
* tests: Add expected generated C sourcesRico Tzschichholz2021-07-1650-0/+12347
|
* vala: Add foreach statement support for GLib.GenericArrayCorentin Noël2021-05-031-0/+48
| | | | It is now possible to use foreach with a GLib.GenericArray type
* tests: Extend "GArray" tests to increase coverageRico Tzschichholz2021-04-111-5/+14
|
* codegen: Report error for missing type-arguments of HashTable (de)serializationRico Tzschichholz2021-03-071-0/+12
| | | | Fixes https://gitlab.gnome.org/GNOME/vala/issues/1147
* tests: Don't leak array if length is -1Rico Tzschichholz2021-02-041-0/+3
| | | | Found by -fsanitize=address
* glib-2.0: Bind assert_cmp* functionsChristopher White2020-12-021-0/+108
| | | | | | | | | | | | | Add assert_cmpstr, assert_cmpint, assert_cmpuint, assert_cmphex, assert_cmpfloat, assert_cmpfloat_with_epsilon and assert_cmpvariant. Add enum GLib.CompareOperator which defines the supported operators. "g_assert_cmpint(foo,==,1)" translates to "assert_cmpint(foo, EQ, 1)" Based on patch by Luca Bruno Fixes https://gitlab.gnome.org/GNOME/vala/issues/395
* glib-2.0: Add GLib.[S]List.is_empty() convenience methods for non-nullRico Tzschichholz2020-11-251-0/+6
|
* tests: Add string.printf() test to increase coverageRico Tzschichholz2020-11-141-0/+6
|
* vala: Use DataType.compatible() to check for string concatenationRico Tzschichholz2020-11-021-0/+22
| | | | | | | Make the checks match the ones performed by the code-generator to prevent invalid c-code to be created. See https://gitlab.gnome.org/GNOME/vala/issues/1100
* codegen: The actual struct size is required for calloc (POSIX)Rico Tzschichholz2020-09-071-0/+8
| | | | | | | | | | | Found by -Werror=array-bounds on ppc64el with gcc 10.2 and musl 1.2 basic_types_arrays.c:1268:2: error: 'memcpy' forming offset [8, 23] is out of the bounds [0, 8] [-Werror=array-bounds] 1268 | memcpy (dup, self, sizeof (Foo)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fixes https://gitlab.gnome.org/GNOME/vala/issues/1068
* tests: Extend "default gtype" tests to increase coverageRico Tzschichholz2020-07-051-0/+34
|
* tests: Don't use invalid syntax to declare local variable with array typeRico Tzschichholz2020-07-021-2/+2
| | | | See https://gitlab.gnome.org/GNOME/vala/issues/942
* parser: Map empty start/end index to 0/length for slice expressionswb96882020-05-262-0/+29
| | | | | | | | This allows a syntax like a[:], a[2:] or a[:3] for arrays and strings. Co-authored-by: Simon Werbeck <simon.werbeck@gmail.com> Fixes https://gitlab.gnome.org/GNOME/vala/issues/238
* tests: Extend "s[p]lice" tests to increase coverageRico Tzschichholz2020-05-242-0/+13
|
* Revert "glib-2.0: Map given end == 0 for string.slice/splice() to string.length"Rico Tzschichholz2020-05-241-12/+0
| | | | This reverts commit f844ad1c02fb5b17e923a7ba4e69cf2a7df96a14.
* glib-2.0: Map given end == 0 for string.slice/splice() to string.lengthwb96882020-05-231-0/+12
| | | | Fixes https://gitlab.gnome.org/GNOME/vala/issues/179
* vala: Transform cast from integer-type to boxed-typeRico Tzschichholz2020-05-101-0/+13
| | | | | | Don't generate faulty c-code with results in segmentation faults. Fixes https://gitlab.gnome.org/GNOME/vala/issues/992
* vala: Transform cast from floating-type to boxed-typeRico Tzschichholz2020-05-101-0/+7
| | | | | | Don't generate invalid c-code leading to "cannot convert to a pointer type" Fixes https://gitlab.gnome.org/GNOME/vala/issues/991
* vala: Consider boolean types are compatible with each otherRico Tzschichholz2020-04-012-1/+22
|
* tests: Drop usage of "--main main" and avoid ambigious entry-pointsRico Tzschichholz2020-03-221-5/+0
|