[vala/0.54] tests: Add more "type-arguments" tests to increase coverage
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.54] tests: Add more "type-arguments" tests to increase coverage
- Date: Tue, 19 Oct 2021 08:01:02 +0000 (UTC)
commit e65f0b4485063177e6884308931f94a150e0bfe9
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Sun Oct 17 09:15:58 2021 +0200
tests: Add more "type-arguments" tests to increase coverage
tests/Makefile.am | 4 ++++
tests/semantic/field-too-few-type-arguments.test | 9 +++++++++
tests/semantic/field-too-many-type-arguments.test | 9 +++++++++
tests/semantic/property-too-few-type-arguments.test | 11 +++++++++++
tests/semantic/property-too-many-type-arguments.test | 11 +++++++++++
5 files changed, 44 insertions(+)
---
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<G,T> {
+}
+
+Foo<string> 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<G> {
+}
+
+Foo<string,int> 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<G,T> {
+}
+
+class Bar {
+ public Foo<string> 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<G> {
+}
+
+class Bar {
+ public Foo<string,int> foo { get; set; }
+}
+
+void main () {
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]