X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=tests%2FTestCompiler.vala;h=6ff082b53469aedc05544a3efd65e33a6a631241;hb=b52488dd7fe47ff641df6dbeff6583cad4e95d77;hp=fa09f8cee5fc49a458a6ac0f573b2e1d4cfd1edd;hpb=ffec529c4896a6374257235061733579b6a9637a;p=app.Builder.js diff --git a/tests/TestCompiler.vala b/tests/TestCompiler.vala index fa09f8cee..6ff082b53 100644 --- a/tests/TestCompiler.vala +++ b/tests/TestCompiler.vala @@ -1,5 +1,5 @@ -// valac TreeBuilder.vala --pkg libvala-0.24 --pkg posix -o /tmp/treebuilder +// valac TestCompiler.vala --pkg libvala-0.26 --pkg posix -o /tmp/TestCompiler namespace Palete { @@ -27,7 +27,7 @@ namespace Palete { - public Gee.HashMap checkString( ) + public void checkString( ) { // init context: var valac = "valac " ; @@ -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 ; } @@ -165,7 +163,7 @@ namespace Palete { print("%s\n", valac); print("ALL OK?\n"); - return this.report.line_errors; + return ; } // // startpoint: @@ -173,13 +171,15 @@ namespace Palete { } } -/* + int main (string[] args) { - var a = new ValaSource(file); - a.create_valac_tree(); + for (var i = 0;i < 1000;i++) { + var a = new Palete.TestCompiler("/home/alan/gitlive/app.Builder.js/tests/TestCompiler.vala"); + a.checkString(); + } return 0; } -*/ +