From: Rico Tzschichholz Date: Sun, 17 Oct 2021 07:15:58 +0000 (+0200) Subject: tests: Add more "type-arguments" tests to increase coverage X-Git-Tag: 0.55.1~136 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ca73184f5dd2c0a9ed26cad3d8b8a1b46795aa1e;p=thirdparty%2Fvala.git tests: Add more "type-arguments" tests to increase coverage --- diff --git a/tests/Makefile.am b/tests/Makefile.am index b135ba95f..2541eb97f 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1019,6 +1019,8 @@ TESTS = \ semantic/field-non-constant.test \ semantic/field-owned-to-unowned.test \ semantic/field-static-instance-access.test \ + semantic/field-too-few-type-arguments.test \ + semantic/field-too-many-type-arguments.test \ semantic/field-valist.test \ semantic/field-void.test \ semantic/floating-reference.vala \ @@ -1128,6 +1130,8 @@ TESTS = \ semantic/property-struct-override.test \ semantic/property-struct-protected.test \ semantic/property-struct-virtual.test \ + semantic/property-too-few-type-arguments.test \ + semantic/property-too-many-type-arguments.test \ semantic/property-void.test \ semantic/reference-transfer-not-supported.test \ semantic/reference-transfer-unavailable.test \ diff --git a/tests/semantic/field-too-few-type-arguments.test b/tests/semantic/field-too-few-type-arguments.test new file mode 100644 index 000000000..150b04928 --- /dev/null +++ b/tests/semantic/field-too-few-type-arguments.test @@ -0,0 +1,9 @@ +Invalid Code + +class Foo { +} + +Foo bar; + +void main () { +} diff --git a/tests/semantic/field-too-many-type-arguments.test b/tests/semantic/field-too-many-type-arguments.test new file mode 100644 index 000000000..a26a7996c --- /dev/null +++ b/tests/semantic/field-too-many-type-arguments.test @@ -0,0 +1,9 @@ +Invalid Code + +class Foo { +} + +Foo bar; + +void main () { +} diff --git a/tests/semantic/property-too-few-type-arguments.test b/tests/semantic/property-too-few-type-arguments.test new file mode 100644 index 000000000..e0c0fa7df --- /dev/null +++ b/tests/semantic/property-too-few-type-arguments.test @@ -0,0 +1,11 @@ +Invalid Code + +class Foo { +} + +class Bar { + public Foo foo { get; set; } +} + +void main () { +} diff --git a/tests/semantic/property-too-many-type-arguments.test b/tests/semantic/property-too-many-type-arguments.test new file mode 100644 index 000000000..ff8326404 --- /dev/null +++ b/tests/semantic/property-too-many-type-arguments.test @@ -0,0 +1,11 @@ +Invalid Code + +class Foo { +} + +class Bar { + public Foo foo { get; set; } +} + +void main () { +}