tests/TreeBuilder.vala
[app.Builder.js] / tests / TreeBuilder.vala
index 9f52d1f..f77e7de 100644 (file)
@@ -48,21 +48,21 @@ public class TreeBuilder : Vala.CodeVisitor {
                //      return context;
                //}
 
-               var testcode = new Vala.SourceFile (
+               var source_file = new Vala.SourceFile (
                        context, 
                        Vala.SourceFileType.SOURCE, 
-                       "/dev/null",
+                       "stdin.vala",
                        "void atest() { 
-                           var a = 1; 
+                           vasdvkls;dakf]';23l5r;l 
                            a++;
                        }"
                     );
-               context.add_source_file (testcode);
+               //context.add_source_file (testcode);
 
                
-               var source_file = new Vala.SourceFile (context, 
-                               Vala.SourceFileType.SOURCE, 
-                               "/home/alan/gitlive/app.Builder.js/tests/TreeBuilder.vala");
+               // source_file = new Vala.SourceFile (context, 
+                //               Vala.SourceFileType.SOURCE, 
+                //              "/home/alan/gitlive/app.Builder.js/tests/TreeBuilder.vala");
 
                //if (source_package == null) {
                //source_package = register_package (new Package (settings.pkg_name, false, null));
@@ -73,7 +73,7 @@ public class TreeBuilder : Vala.CodeVisitor {
                context.add_external_package ("glib-2.0");
                context.add_external_package ("gobject-2.0");
                context.add_external_package ("libvala-0.24");
-               context.add_external_package ("posix");
+               //context.add_external_package ("posix");
                //if (context.profile == Vala.Profile.GOBJECT) {
                        // import the GLib namespace by default (namespace of backend-specific standard library)
                        var ns_ref = new Vala.UsingDirective (new Vala.UnresolvedSymbol (null, "GLib", null));
@@ -99,8 +99,10 @@ public class TreeBuilder : Vala.CodeVisitor {
                // check context:
                context.check ();
                if (context.report.get_errors () > 0) {
+                       print("check got errors");
                        return context;
                }
+               print("ALL OK?\n");
                return context;
        }
 //