[vala/0.50] tests: Add "delete" test to increase coverage
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.50] tests: Add "delete" test to increase coverage
- Date: Wed, 19 May 2021 07:18:40 +0000 (UTC)
commit cc361d78a9488d51fd521924c097e953e8536f52
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Wed Apr 28 21:33:10 2021 +0200
tests: Add "delete" test to increase coverage
tests/Makefile.am | 1 +
tests/pointers/delete.vala | 16 ++++++++++++++++
2 files changed, 17 insertions(+)
---
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 3f2f5dea8..81902def4 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -157,6 +157,7 @@ TESTS = \
chainup/struct-this.vala \
chainup/struct-this-foo.vala \
chainup/bug791785.vala \
+ pointers/delete.vala \
pointers/bug590641.vala \
methods/array-length-type.vala \
methods/lambda.vala \
diff --git a/tests/pointers/delete.vala b/tests/pointers/delete.vala
new file mode 100644
index 000000000..f19dd859f
--- /dev/null
+++ b/tests/pointers/delete.vala
@@ -0,0 +1,16 @@
+class Foo {
+}
+
+class Bar : Foo {
+}
+
+void main () {
+ {
+ Foo* foo = new Foo ();
+ delete foo;
+ }
+ {
+ Bar* bar = new Bar ();
+ delete bar;
+ }
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]