[vala/staging] tests: Move namespaces.vala into parser and merge its main methods



commit 14d67428cbeca5bbcb54fede24898ff2fe6582df
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Wed Feb 7 23:17:40 2018 +0100

    tests: Move namespaces.vala into parser and merge its main methods

 tests/Makefile.am                  |    2 +-
 tests/{ => parser}/namespaces.vala |   17 ++++-------------
 2 files changed, 5 insertions(+), 14 deletions(-)
---
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 063c7e8..c8f8416 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -65,7 +65,6 @@ TESTS = \
        chainup/struct-this-foo.vala \
        chainup/bug791785.vala \
        pointers/bug590641.vala \
-       namespaces.vala \
        methods/lambda.vala \
        methods/closures.vala \
        methods/contains.vala \
@@ -409,6 +408,7 @@ TESTS = \
        parser/method-no-static-override.test \
        parser/method-no-static-virtual.test \
        parser/method-no-virtual-override.test \
+       parser/namespaces.vala \
        parser/namespace-missing-bracket.test \
        parser/preprocessor.vala \
        parser/property-default-redefined.test \
diff --git a/tests/namespaces.vala b/tests/parser/namespaces.vala
similarity index 60%
rename from tests/namespaces.vala
rename to tests/parser/namespaces.vala
index b35db59..61e4dfc 100644
--- a/tests/namespaces.vala
+++ b/tests/parser/namespaces.vala
@@ -6,18 +6,6 @@ public class GlobalTestClass {
 }
 
 namespace Maman {
-       static int main () {
-               stdout.printf ("Namespace Test\n");
-
-               Bar.run ();
-
-               new GlobalTestClass();
-
-               var obj = new ClassInNestedNamespace ();
-
-               return 0;
-       }
-
        class Bar : Object {
                public static void run () {
                        stdout.printf ("Class in Namespace Test\n");
@@ -30,6 +18,9 @@ public class Foo.Sub.ClassInNestedNamespace {
 
 
 void main () {
-       Maman.main ();
+       stdout.printf ("Namespace Test\n");
+       Bar.run ();
+       new GlobalTestClass();
+       var obj = new ClassInNestedNamespace ();
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]