[vala/0.52] tests: Add invalid "target/destroy access" tests to increase coverage
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.52] tests: Add invalid "target/destroy access" tests to increase coverage
- Date: Tue, 19 Oct 2021 08:00:53 +0000 (UTC)
commit c988f29d4460382a0c661fd1229e3648016d2652
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Mon Oct 18 09:02:33 2021 +0200
tests: Add invalid "target/destroy access" tests to increase coverage
tests/Makefile.am | 2 ++
tests/semantic/delegate-access-destroy-invalid.test | 9 +++++++++
tests/semantic/delegate-access-target-invalid.test | 9 +++++++++
3 files changed, 20 insertions(+)
---
diff --git a/tests/Makefile.am b/tests/Makefile.am
index b7a287045..e43d3ce89 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -987,6 +987,8 @@ TESTS = \
semantic/creation-method-errordomain.test \
semantic/creation-method-interface.test \
semantic/creation-method-namespace.test \
+ semantic/delegate-access-destroy-invalid.test \
+ semantic/delegate-access-target-invalid.test \
semantic/delegate-error-accessibility.test \
semantic/delegate-return-valist.test \
semantic/delegate-too-few-type-arguments.test \
diff --git a/tests/semantic/delegate-access-destroy-invalid.test
b/tests/semantic/delegate-access-destroy-invalid.test
new file mode 100644
index 000000000..207d12873
--- /dev/null
+++ b/tests/semantic/delegate-access-destroy-invalid.test
@@ -0,0 +1,9 @@
+Invalid Code
+
+[CCode (has_target = false)]
+delegate void Foo ();
+
+void main () {
+ Foo foo = null;
+ var d = foo.destroy;
+}
diff --git a/tests/semantic/delegate-access-target-invalid.test
b/tests/semantic/delegate-access-target-invalid.test
new file mode 100644
index 000000000..054186c0f
--- /dev/null
+++ b/tests/semantic/delegate-access-target-invalid.test
@@ -0,0 +1,9 @@
+Invalid Code
+
+[CCode (has_target = false)]
+delegate void Foo ();
+
+void main () {
+ Foo foo = null;
+ var t = foo.target;
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]