From: Rico Tzschichholz Date: Wed, 13 Jun 2018 15:53:21 +0000 (+0200) Subject: tests: Add invalid "duped constructor/destructor" test to increase coverage X-Git-Tag: 0.41.90~67 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cbd8b9d20df1e397b0f8f72dd693c0c9079aed29;p=thirdparty%2Fvala.git tests: Add invalid "duped constructor/destructor" test to increase coverage --- diff --git a/tests/Makefile.am b/tests/Makefile.am index 0ebea0658..c62cc62b3 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -403,15 +403,21 @@ TESTS = \ parser/assignment.vala \ parser/attribute-duplicate.test \ parser/attribute-wrong-number.test \ + parser/constructor-class-exists.test \ + parser/constructor-exists.test \ parser/constructor-no-new.test \ parser/constructor-no-static-class.test \ + parser/constructor-static-exists.test \ parser/continue-statement.vala \ parser/creation-no-abstract.test \ parser/creation-no-override.test \ parser/creation-no-virtual.test \ parser/delegate-no-new.test \ + parser/destructor-class-exists.test \ + parser/destructor-exists.test \ parser/destructor-no-new.test \ parser/destructor-no-static-class.test \ + parser/destructor-static-exists.test \ parser/destructor-wrong-name.test \ parser/do-statement.vala \ parser/expect-endbrace.test \ diff --git a/tests/parser/constructor-class-exists.test b/tests/parser/constructor-class-exists.test new file mode 100644 index 000000000..05b83f89f --- /dev/null +++ b/tests/parser/constructor-class-exists.test @@ -0,0 +1,12 @@ +Invalid Code + +public class Test { + class construct { + } + + class construct { + } +} + +void main () { +} diff --git a/tests/parser/constructor-exists.test b/tests/parser/constructor-exists.test new file mode 100644 index 000000000..1ef06651a --- /dev/null +++ b/tests/parser/constructor-exists.test @@ -0,0 +1,12 @@ +Invalid Code + +public class Test { + construct { + } + + construct { + } +} + +void main () { +} diff --git a/tests/parser/constructor-static-exists.test b/tests/parser/constructor-static-exists.test new file mode 100644 index 000000000..444905cf7 --- /dev/null +++ b/tests/parser/constructor-static-exists.test @@ -0,0 +1,12 @@ +Invalid Code + +public class Test { + static construct { + } + + static construct { + } +} + +void main () { +} diff --git a/tests/parser/destructor-class-exists.test b/tests/parser/destructor-class-exists.test new file mode 100644 index 000000000..9e35ecc86 --- /dev/null +++ b/tests/parser/destructor-class-exists.test @@ -0,0 +1,12 @@ +Invalid Code + +public class Test { + class ~Test () { + } + + class ~Test () { + } +} + +void main () { +} diff --git a/tests/parser/destructor-exists.test b/tests/parser/destructor-exists.test new file mode 100644 index 000000000..f1b4662fa --- /dev/null +++ b/tests/parser/destructor-exists.test @@ -0,0 +1,12 @@ +Invalid Code + +public class Test { + ~Test () { + } + + ~Test () { + } +} + +void main () { +} diff --git a/tests/parser/destructor-static-exists.test b/tests/parser/destructor-static-exists.test new file mode 100644 index 000000000..4175a9d43 --- /dev/null +++ b/tests/parser/destructor-static-exists.test @@ -0,0 +1,12 @@ +Invalid Code + +public class Test { + static ~Test () { + } + + static ~Test () { + } +} + +void main () { +}