X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=tests%2FTestCompiler.vala;h=7c23d11d61279900ba2557040dd2cc2d3fdcfdc6;hb=d3015896da948fcfbb5847f525649859f26b8be3;hp=ffa5de64d14ca718d66b375b06952a17280123a2;hpb=328e89c5bdbc3fac0305bdc271b42fbff5a0d2bb;p=app.Builder.js diff --git a/tests/TestCompiler.vala b/tests/TestCompiler.vala index ffa5de64d..7c23d11d6 100644 --- a/tests/TestCompiler.vala +++ b/tests/TestCompiler.vala @@ -68,9 +68,7 @@ namespace Palete { context.thread = true; - this.report = new ValaSourceReport(this.file); - context.report = this.report; - + context.basedir = "/tmp"; //Posix.realpath ("."); @@ -128,7 +126,7 @@ namespace Palete { Vala.CodeContext.pop (); - return this.report.line_errors; + return; } @@ -138,7 +136,7 @@ namespace Palete { if (context.report.get_errors () > 0) { Vala.CodeContext.pop (); - return this.report.line_errors; + return ; } @@ -159,9 +157,13 @@ namespace Palete { #endif */ + + + context.resolver.resolve(new Vala.CodeContext()); + context.analyzer.context = null; + context.flow_analyzer.analyze(new Vala.CodeContext()); + //context.analyzer = null; << private Vala.CodeContext.pop (); - //(new Vala.CodeNode()).get_error_types().clear(); - //(new Vala.NullType()).get_type_arguments().clear(); print("%s\n", valac); print("ALL OK?\n"); @@ -177,8 +179,8 @@ namespace Palete { int main (string[] args) { for (var i = 0;i < 1000;i++) { - var a = new TestCompiler(file); - a.compileString(); + var a = new Palete.TestCompiler("/home/alan/gitlive/app.Builder.js/tests/TestCompiler.vala"); + a.checkString(); } return 0; }