[vala/staging: 2/2] tests: Add "subtype cycle" tests to increase coverage
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging: 2/2] tests: Add "subtype cycle" tests to increase coverage
- Date: Wed, 28 Nov 2018 19:28:56 +0000 (UTC)
commit 4b03c59bc5fdb7904cd1f25eb0531db7ec752e0d
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Wed Nov 28 17:48:55 2018 +0100
tests: Add "subtype cycle" tests to increase coverage
tests/Makefile.am | 3 +++
tests/resolver/class-base-cycle.test | 10 ++++++++++
tests/resolver/interface-prerequisite-cycle.test | 10 ++++++++++
tests/resolver/struct-base-cycle.test | 10 ++++++++++
4 files changed, 33 insertions(+)
---
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 34614c934..9595321ca 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -512,6 +512,9 @@ TESTS = \
parser/yield-return.vala \
parser/bug728574.vala \
parser/bug749576.vala \
+ resolver/class-base-cycle.test \
+ resolver/interface-prerequisite-cycle.test \
+ resolver/struct-base-cycle.test \
semantic/array-stacked.test \
semantic/array-incompatible-initializer.test \
semantic/array-incompatible-initializer2.test \
diff --git a/tests/resolver/class-base-cycle.test b/tests/resolver/class-base-cycle.test
new file mode 100644
index 000000000..5951253fc
--- /dev/null
+++ b/tests/resolver/class-base-cycle.test
@@ -0,0 +1,10 @@
+Invalid Code
+
+class Bar : Foo {
+}
+
+class Foo : Bar {
+}
+
+void main () {
+}
diff --git a/tests/resolver/interface-prerequisite-cycle.test
b/tests/resolver/interface-prerequisite-cycle.test
new file mode 100644
index 000000000..585c7db5c
--- /dev/null
+++ b/tests/resolver/interface-prerequisite-cycle.test
@@ -0,0 +1,10 @@
+Invalid Code
+
+interface IBar : IFoo {
+}
+
+interface IFoo : IBar {
+}
+
+void main () {
+}
diff --git a/tests/resolver/struct-base-cycle.test b/tests/resolver/struct-base-cycle.test
new file mode 100644
index 000000000..111c7d89f
--- /dev/null
+++ b/tests/resolver/struct-base-cycle.test
@@ -0,0 +1,10 @@
+Invalid Code
+
+struct Bar : Foo {
+}
+
+struct Foo : Bar {
+}
+
+void main () {
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]