[vala/wip/tests] tests: Add invalid "property" tests to increase coverage
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/wip/tests] tests: Add invalid "property" tests to increase coverage
- Date: Mon, 5 Feb 2018 08:40:13 +0000 (UTC)
commit 2ba8c10814373f19d1bd4d8e1c45715500aa8925
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Mon Feb 5 09:39:30 2018 +0100
tests: Add invalid "property" tests to increase coverage
tests/Makefile.am | 13 +++++++++++++
.../property-abstract-derived-compact.test | 12 ++++++++++++
tests/semantic/property-abstract.test | 8 ++++++++
tests/semantic/property-accessibility.test | 11 +++++++++++
tests/semantic/property-construct.test | 8 ++++++++
tests/semantic/property-initializer-type.test | 8 ++++++++
tests/semantic/property-override-class.test | 13 +++++++++++++
tests/semantic/property-override-interface.test | 13 +++++++++++++
tests/semantic/property-override.test | 12 ++++++++++++
tests/semantic/property-struct-abstract.test | 9 +++++++++
tests/semantic/property-struct-override.test | 9 +++++++++
tests/semantic/property-struct-protected.test | 9 +++++++++
tests/semantic/property-struct-virtual.test | 9 +++++++++
tests/semantic/property-void.test | 8 ++++++++
14 files changed, 142 insertions(+), 0 deletions(-)
---
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 0a8139b..6eb70ce 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -405,6 +405,19 @@ TESTS = \
semantic/parameter-params.test \
semantic/parameter-ref-default.test \
semantic/parameter-void.test \
+ semantic/property-abstract.test \
+ semantic/property-abstract-derived-compact.test \
+ semantic/property-accessibility.test \
+ semantic/property-construct.test \
+ semantic/property-initializer-type.test \
+ semantic/property-override.test \
+ semantic/property-override-class.test \
+ semantic/property-override-interface.test \
+ semantic/property-struct-abstract.test \
+ semantic/property-struct-override.test \
+ semantic/property-struct-protected.test \
+ semantic/property-struct-virtual.test \
+ semantic/property-void.test \
$(NULL)
NON_NULL_TESTS = \
diff --git a/tests/semantic/property-abstract-derived-compact.test
b/tests/semantic/property-abstract-derived-compact.test
new file mode 100644
index 0000000..02d38d3
--- /dev/null
+++ b/tests/semantic/property-abstract-derived-compact.test
@@ -0,0 +1,12 @@
+Invalid Code
+
+[Compact]
+class Foo {
+}
+
+class Bar : Foo {
+ public abstract string foo { get; }
+}
+
+void main () {
+}
diff --git a/tests/semantic/property-abstract.test b/tests/semantic/property-abstract.test
new file mode 100644
index 0000000..41fc955
--- /dev/null
+++ b/tests/semantic/property-abstract.test
@@ -0,0 +1,8 @@
+Invalid Code
+
+class Bar {
+ public abstract string foo { get; }
+}
+
+void main () {
+}
diff --git a/tests/semantic/property-accessibility.test b/tests/semantic/property-accessibility.test
new file mode 100644
index 0000000..d532723
--- /dev/null
+++ b/tests/semantic/property-accessibility.test
@@ -0,0 +1,11 @@
+Invalid Code
+
+class Bar {
+}
+
+public class Foo {
+ public Bar foo { get; set; }
+}
+
+void main () {
+}
diff --git a/tests/semantic/property-construct.test b/tests/semantic/property-construct.test
new file mode 100644
index 0000000..25f73cd
--- /dev/null
+++ b/tests/semantic/property-construct.test
@@ -0,0 +1,8 @@
+Invalid Code
+
+class Foo {
+ string foo { get; construct set; }
+}
+
+void main () {
+}
diff --git a/tests/semantic/property-initializer-type.test b/tests/semantic/property-initializer-type.test
new file mode 100644
index 0000000..201fc58
--- /dev/null
+++ b/tests/semantic/property-initializer-type.test
@@ -0,0 +1,8 @@
+Invalid Code
+
+public class Foo {
+ public string foo { get; set; default = 23; }
+}
+
+void main () {
+}
diff --git a/tests/semantic/property-override-class.test b/tests/semantic/property-override-class.test
new file mode 100644
index 0000000..1bf51c6
--- /dev/null
+++ b/tests/semantic/property-override-class.test
@@ -0,0 +1,13 @@
+Invalid Code
+
+class Bar {
+ public virtual int foo { get; set; }
+}
+
+class Foo : Bar {
+ public override string foo { get; set; }
+}
+
+void main () {
+}
+
diff --git a/tests/semantic/property-override-interface.test b/tests/semantic/property-override-interface.test
new file mode 100644
index 0000000..317ba77
--- /dev/null
+++ b/tests/semantic/property-override-interface.test
@@ -0,0 +1,13 @@
+Invalid Code
+
+interface Bar {
+ public abstract int foo { get; set; }
+}
+
+class Foo : Bar {
+ public override string foo { get; set; }
+}
+
+void main () {
+}
+
diff --git a/tests/semantic/property-override.test b/tests/semantic/property-override.test
new file mode 100644
index 0000000..c714696
--- /dev/null
+++ b/tests/semantic/property-override.test
@@ -0,0 +1,12 @@
+Invalid Code
+
+class Bar {
+}
+
+class Foo : Bar {
+ public override string foo { get; set; }
+}
+
+void main () {
+}
+
diff --git a/tests/semantic/property-struct-abstract.test b/tests/semantic/property-struct-abstract.test
new file mode 100644
index 0000000..4f4437a
--- /dev/null
+++ b/tests/semantic/property-struct-abstract.test
@@ -0,0 +1,9 @@
+Invalid Code
+
+struct Foo {
+ public abstract string foo { get; set; }
+}
+
+void main () {
+}
+
diff --git a/tests/semantic/property-struct-override.test b/tests/semantic/property-struct-override.test
new file mode 100644
index 0000000..5a599dc
--- /dev/null
+++ b/tests/semantic/property-struct-override.test
@@ -0,0 +1,9 @@
+Invalid Code
+
+struct Foo {
+ public override string foo { get; set; }
+}
+
+void main () {
+}
+
diff --git a/tests/semantic/property-struct-protected.test b/tests/semantic/property-struct-protected.test
new file mode 100644
index 0000000..0062291
--- /dev/null
+++ b/tests/semantic/property-struct-protected.test
@@ -0,0 +1,9 @@
+Invalid Code
+
+struct Foo {
+ protected string foo { get; set; }
+}
+
+void main () {
+}
+
diff --git a/tests/semantic/property-struct-virtual.test b/tests/semantic/property-struct-virtual.test
new file mode 100644
index 0000000..a6c593f
--- /dev/null
+++ b/tests/semantic/property-struct-virtual.test
@@ -0,0 +1,9 @@
+Invalid Code
+
+struct Foo {
+ public virtual string foo { get; set; }
+}
+
+void main () {
+}
+
diff --git a/tests/semantic/property-void.test b/tests/semantic/property-void.test
new file mode 100644
index 0000000..abfb428
--- /dev/null
+++ b/tests/semantic/property-void.test
@@ -0,0 +1,8 @@
+Invalid Code
+
+class Foo {
+ public void foo { get; set; }
+}
+
+void main () {
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]