From: Rico Tzschichholz Date: Mon, 10 Aug 2020 09:56:47 +0000 (+0200) Subject: tests: Add "constant and union" gir test to increase coverage X-Git-Tag: 0.40.24~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2b80d8e7f7c1bb3b405b265150406b7f2d14545f;p=thirdparty%2Fvala.git tests: Add "constant and union" gir test to increase coverage --- diff --git a/tests/Makefile.am b/tests/Makefile.am index 6f2ec7b9b..1f9a5ea30 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -559,6 +559,7 @@ TESTS = \ gir/async-result-pos.test \ gir/async-sync-out.test \ gir/class.test \ + gir/constant.test \ gir/delegate-alias-without-target.test \ gir/delegate-array-length-type.test \ gir/delegate-closure-destroy-index-conflict.test \ @@ -569,6 +570,7 @@ TESTS = \ gir/parameter-nullable-out-simple-type.test \ gir/property-non-readable.test \ gir/symbol-type-csuffix.test \ + gir/union.test \ annotations/deprecated.vala \ annotations/description.vala \ annotations/noaccessormethod.test \ diff --git a/tests/gir/constant.test b/tests/gir/constant.test new file mode 100644 index 000000000..196ae7577 --- /dev/null +++ b/tests/gir/constant.test @@ -0,0 +1,22 @@ +GIR + +Input: + + + + + + + + + + +Output: + +[CCode (cheader_filename = "test.h", cname = "TEST_FOO_CONSTANT")] +public const string FOO_CONSTANT; +[CCode (array_length = false, array_null_terminated = true, cheader_filename = "test.h", cname = "TEST_FOO_CONSTANT_ARRAY")] +public const string[] FOO_CONSTANT_ARRAY; diff --git a/tests/gir/union.test b/tests/gir/union.test new file mode 100644 index 000000000..51f118aa5 --- /dev/null +++ b/tests/gir/union.test @@ -0,0 +1,20 @@ +GIR + +Input: + + + + + + + + + + +Output: + +[CCode (cheader_filename = "test.h")] +public struct Foo { + public uint bar; + public int manam; +}