diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2018-09-21 18:12:49 +0200 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2018-09-21 18:12:49 +0200 |
commit | 50a3683af1fd8d7e5d8da31d3ad0fceb0f994e70 (patch) | |
tree | e7f0a03cd5b9ca183cb43e685a56409147147305 /tests | |
parent | 12a354af4d64dc8cce692499e2aeacde3eabf43a (diff) | |
download | vala-50a3683af1fd8d7e5d8da31d3ad0fceb0f994e70.tar.gz |
tests: Add invalid "property for Object() chainup" tests to increase coverage
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Makefile.am | 3 | ||||
-rw-r--r-- | tests/semantic/chainup-gobject-incompatible-type-property.test | 14 | ||||
-rw-r--r-- | tests/semantic/chainup-gobject-unknown-property.test | 13 | ||||
-rw-r--r-- | tests/semantic/chainup-gobject-unsupported-type-property.test | 19 |
4 files changed, 49 insertions, 0 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index d41f7ccb4..1057f72a3 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -492,6 +492,9 @@ TESTS = \ semantic/assignment-same-variable.vala \ semantic/assignment-signal-incompatible-method.test \ semantic/assignment-signal-incompatible-type.test \ + semantic/chainup-gobject-incompatible-type-property.test \ + semantic/chainup-gobject-unknown-property.test \ + semantic/chainup-gobject-unsupported-type-property.test \ semantic/class-base-type-invalid.test \ semantic/class-base-type-less-accessible.test \ semantic/class-compact-derived-instance-field.test \ diff --git a/tests/semantic/chainup-gobject-incompatible-type-property.test b/tests/semantic/chainup-gobject-incompatible-type-property.test new file mode 100644 index 000000000..bd0dfc652 --- /dev/null +++ b/tests/semantic/chainup-gobject-incompatible-type-property.test @@ -0,0 +1,14 @@ +Invalid Code + +class Foo : Object { + public string s { get; construct; } +} + +class Bar : Foo { + public Bar () { + Object (s: 42); + } +} + +void main () { +} diff --git a/tests/semantic/chainup-gobject-unknown-property.test b/tests/semantic/chainup-gobject-unknown-property.test new file mode 100644 index 000000000..b7648b52a --- /dev/null +++ b/tests/semantic/chainup-gobject-unknown-property.test @@ -0,0 +1,13 @@ +Invalid Code + +class Foo : Object { +} + +class Bar : Foo { + public Bar () { + Object (unknown: "foo"); + } +} + +void main () { +} diff --git a/tests/semantic/chainup-gobject-unsupported-type-property.test b/tests/semantic/chainup-gobject-unsupported-type-property.test new file mode 100644 index 000000000..49ee6f7dd --- /dev/null +++ b/tests/semantic/chainup-gobject-unsupported-type-property.test @@ -0,0 +1,19 @@ +Invalid Code + +delegate void Func (); + +class Foo : Object { + public Func f { get; construct; } +} + +class Bar : Foo { + public Bar () { + Object (f: func); + } + + void func () { + } +} + +void main () { +} |