From: Rico Tzschichholz Date: Sun, 27 Nov 2016 11:06:25 +0000 (+0100) Subject: tests: Add gir-test for fixed-size arrays X-Git-Tag: 0.35.2~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=60fe7a7d7e68f032f14c65ceabd8b5ad37838b53;p=thirdparty%2Fvala.git tests: Add gir-test for fixed-size arrays --- diff --git a/tests/Makefile.am b/tests/Makefile.am index 1e6fd84c3..c94096d54 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -244,6 +244,7 @@ TESTS = \ gir/bug651773.test \ gir/bug667751.test \ gir/bug742012.test \ + gir/array-fixed-length.test \ annotations/deprecated.vala \ annotations/description.vala \ $(NULL) diff --git a/tests/gir/array-fixed-length.test b/tests/gir/array-fixed-length.test new file mode 100644 index 000000000..0d7e70ee5 --- /dev/null +++ b/tests/gir/array-fixed-length.test @@ -0,0 +1,68 @@ +GIR + +Input: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Output: + +[CCode (cheader_filename = "test.h")] +public static void change_array ([CCode (array_length = false)] ref uint8 array[2]); +[CCode (cheader_filename = "test.h")] +public static void get_array_out ([CCode (array_length = false)] out uint8 array[8]); +[CCode (array_length = false, cheader_filename = "test.h")] +public static unowned uint8[] get_array_return (); +[CCode (cheader_filename = "test.h")] +public static void set_array ([CCode (array_length = false)] uint8 array[4]);