From ccefa8e4ab4e0f342eff0837c545352388e48847 Mon Sep 17 00:00:00 2001 From: Rico Tzschichholz Date: Sun, 22 Mar 2020 17:15:05 +0100 Subject: tests: Drop usage of "--main main" and avoid ambigious entry-points --- tests/basic-types/pointers.vala | 5 ----- tests/control-flow/break.vala | 4 ---- tests/control-flow/expressions-conditional.vala | 4 ---- tests/control-flow/switch.vala | 6 ------ tests/delegates/delegates.vala | 5 ----- tests/enums/enums.vala | 5 ----- tests/methods/lambda.vala | 5 ----- tests/objects/fields.vala | 6 ++---- tests/objects/methods.vala | 5 ----- tests/objects/properties.vala | 5 ----- tests/objects/test-025.vala | 5 ----- tests/objects/test-026.vala | 5 ----- tests/objects/test-029.vala | 5 ----- tests/objects/test-034.vala | 5 ----- tests/testrunner.sh | 1 - 15 files changed, 2 insertions(+), 69 deletions(-) diff --git a/tests/basic-types/pointers.vala b/tests/basic-types/pointers.vala index 7517e71b0..cad12a700 100644 --- a/tests/basic-types/pointers.vala +++ b/tests/basic-types/pointers.vala @@ -35,8 +35,3 @@ struct SimpleStruct { assert (i == 42); } } - -void main () { - SimpleStruct.main (); -} - diff --git a/tests/control-flow/break.vala b/tests/control-flow/break.vala index 8505959ad..51719f1a3 100644 --- a/tests/control-flow/break.vala +++ b/tests/control-flow/break.vala @@ -15,7 +15,3 @@ class Maman.Bar : Object { return 0; } } - -void main () { - Maman.Bar.main (); -} diff --git a/tests/control-flow/expressions-conditional.vala b/tests/control-flow/expressions-conditional.vala index 5c48350b5..d75428cec 100644 --- a/tests/control-flow/expressions-conditional.vala +++ b/tests/control-flow/expressions-conditional.vala @@ -19,7 +19,3 @@ class Maman.Bar : Object { return 0; } } - -void main () { - Maman.Bar.main (); -} diff --git a/tests/control-flow/switch.vala b/tests/control-flow/switch.vala index 5a1bb24af..8f52aebf3 100644 --- a/tests/control-flow/switch.vala +++ b/tests/control-flow/switch.vala @@ -80,9 +80,3 @@ class Maman.Foo : Object { private int counter = 0; } - - -void main () { - Maman.Bar.main (); -} - diff --git a/tests/delegates/delegates.vala b/tests/delegates/delegates.vala index 03fb9b17f..eb68ebd06 100644 --- a/tests/delegates/delegates.vala +++ b/tests/delegates/delegates.vala @@ -112,8 +112,3 @@ class Maman.Bar : Object, Foo { return 0; } } - -void main () { - Maman.Bar.main (); -} - diff --git a/tests/enums/enums.vala b/tests/enums/enums.vala index 87bb127d0..9e7dc39b3 100644 --- a/tests/enums/enums.vala +++ b/tests/enums/enums.vala @@ -52,8 +52,3 @@ class Maman.Bar : Object { return 0; } } - -void main () { - Maman.Bar.main (); -} - diff --git a/tests/methods/lambda.vala b/tests/methods/lambda.vala index 00afd9faa..e15686692 100644 --- a/tests/methods/lambda.vala +++ b/tests/methods/lambda.vala @@ -30,8 +30,3 @@ class Maman.Bar : Object { return 0; } } - -void main () { - Maman.Bar.main (); -} - diff --git a/tests/objects/fields.vala b/tests/objects/fields.vala index 4f398eb70..acc7e40e1 100644 --- a/tests/objects/fields.vala +++ b/tests/objects/fields.vala @@ -70,7 +70,7 @@ class Maman.Bar : Foo { private_class_field, public_class_field); } - public static int main () { + public static void run () { stdout.printf ("Field Test: 1"); var bar = new Bar (); @@ -95,8 +95,6 @@ class Maman.Bar : Foo { stdout.printf (" %d", compact.initialized_field); stdout.printf (" 27\n"); - - return 0; } } @@ -105,7 +103,7 @@ class Maman.Baz { } void main () { - Maman.Bar.main (); + Maman.Bar.run (); Maman.Baz baz = new Maman.Baz (); baz.foo = null; } diff --git a/tests/objects/methods.vala b/tests/objects/methods.vala index 9a950c322..cfacc9c73 100644 --- a/tests/objects/methods.vala +++ b/tests/objects/methods.vala @@ -221,8 +221,3 @@ class Maman.ClassTest { c.instance_method (); } } - -void main () { - Maman.SubBar.main (); -} - diff --git a/tests/objects/properties.vala b/tests/objects/properties.vala index b3fc2c860..1ad97367e 100644 --- a/tests/objects/properties.vala +++ b/tests/objects/properties.vala @@ -163,8 +163,3 @@ abstract class Maman.ABiz : Object, IBiz { class Maman.Biz : ABiz { public override int number2 { get; construct; } } - -void main () { - Sample.main (); -} - diff --git a/tests/objects/test-025.vala b/tests/objects/test-025.vala index af052e277..607230e54 100644 --- a/tests/objects/test-025.vala +++ b/tests/objects/test-025.vala @@ -30,8 +30,3 @@ class Maman.SubBar : Bar { return 0; } } - -void main () { - Maman.SubBar.main (); -} - diff --git a/tests/objects/test-026.vala b/tests/objects/test-026.vala index 7d4197212..5bc3b1716 100644 --- a/tests/objects/test-026.vala +++ b/tests/objects/test-026.vala @@ -30,8 +30,3 @@ class Maman.SubBar : Bar { return 0; } } - -void main () { - Maman.SubBar.main (); -} - diff --git a/tests/objects/test-029.vala b/tests/objects/test-029.vala index e923eafd4..dbfd6717c 100644 --- a/tests/objects/test-029.vala +++ b/tests/objects/test-029.vala @@ -23,8 +23,3 @@ class Maman.Foo : Object { return 0; } } - -void main () { - Maman.Foo.main (); -} - diff --git a/tests/objects/test-034.vala b/tests/objects/test-034.vala index 9d39b1f3b..935a3cb92 100644 --- a/tests/objects/test-034.vala +++ b/tests/objects/test-034.vala @@ -26,8 +26,3 @@ class Maman.Bar : Object { stdout.printf ("as C: %d %d %d\n", null != (a as C) ? 1 : 0, null != (b as C) ? 1 : 0, null != (c as C) ? 1 : 0); } } - -void main () { - Maman.Bar.main (); -} - diff --git a/tests/testrunner.sh b/tests/testrunner.sh index bfe3d6df6..92b446427 100755 --- a/tests/testrunner.sh +++ b/tests/testrunner.sh @@ -31,7 +31,6 @@ VALAC=$topbuilddir/compiler/valac$EXEEXT VALAFLAGS="$VALAFLAGS \ --vapidir $vapidir \ --disable-warnings \ - --main main \ --save-temps \ --cc $CC \ -X -g \ -- cgit v1.2.1