Commit 01cd665d authored by Rico Tzschichholz's avatar Rico Tzschichholz

tests: Add invalid "type-argument" tests to increase coverage

parent 479937d8
......@@ -461,11 +461,15 @@ TESTS = \
parser/yield-method.test \
parser/bug728574.vala \
parser/bug749576.vala \
semantic/class-too-few-type-arguments.test \
semantic/class-too-many-type-arguments.test \
semantic/constant-extern.test \
semantic/constant-value.test \
semantic/constant-value-missing.test \
semantic/constant-value-type.test \
semantic/constant-void.test \
semantic/delegate-too-few-type-arguments.test \
semantic/delegate-too-many-type-arguments.test \
semantic/field-accessibility.test \
semantic/field-compact-static.test \
semantic/field-external.test \
......@@ -510,6 +514,8 @@ TESTS = \
semantic/method-private-virtual.test \
semantic/method-protected.test \
semantic/method-return-accessibility.test \
semantic/method-too-few-type-arguments.test \
semantic/method-too-many-type-arguments.test \
semantic/method-virtual.test \
semantic/method-virtual-body.test \
semantic/parameter-accessibility.test \
......
Invalid Code
class Foo<G,T> {
}
void main () {
var foo = new Foo<string> ();
}
Invalid Code
class Foo {
}
void main () {
var foo = new Foo<string> ();
}
Invalid Code
delegate void FooFunc<G,T> (G g, T t);
void main () {
FooFunc<string> foo = (g, t) => {};
}
Invalid Code
delegate void FooFunc ();
void main () {
FooFunc<string> foo = () => {};
}
Invalid Code
void bar<G,T> (G g, T t) {
}
void main () {
bar<string> ("foo", 42);
}
Invalid Code
void bar (string s, int i) {
}
void main () {
bar<string> ("foo", 42);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment