projects
/
app.Builder.js
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tests/enum.vala
[app.Builder.js]
/
tests
/
TestCompiler.vala
diff --git
a/tests/TestCompiler.vala
b/tests/TestCompiler.vala
index
fa09f8c
..
7c23d11
100644
(file)
--- a/
tests/TestCompiler.vala
+++ b/
tests/TestCompiler.vala
@@
-1,5
+1,5
@@
-// valac T
reeBuilder.vala --pkg libvala-0.24 --pkg posix -o /tmp/treebuild
er
+// valac T
estCompiler.vala --pkg libvala-0.26 --pkg posix -o /tmp/TestCompil
er
namespace Palete {
namespace Palete {
@@
-27,7
+27,7
@@
namespace Palete {
- public
Gee.HashMap<int,string>
checkString( )
+ public
void
checkString( )
{
// init context:
var valac = "valac " ;
{
// init context:
var valac = "valac " ;
@@
-68,9
+68,7
@@
namespace Palete {
context.thread = true;
context.thread = true;
- this.report = new ValaSourceReport(this.file);
- context.report = this.report;
-
+
context.basedir = "/tmp"; //Posix.realpath (".");
context.basedir = "/tmp"; //Posix.realpath (".");
@@
-128,7
+126,7
@@
namespace Palete {
Vala.CodeContext.pop ();
Vala.CodeContext.pop ();
- return
this.report.line_errors
;
+ return;
}
}
@@
-138,7
+136,7
@@
namespace Palete {
if (context.report.get_errors () > 0) {
Vala.CodeContext.pop ();
if (context.report.get_errors () > 0) {
Vala.CodeContext.pop ();
- return
this.report.line_errors
;
+ return ;
}
}
@@
-159,13
+157,17
@@
namespace Palete {
#endif
*/
#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 ();
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");
print("%s\n", valac);
print("ALL OK?\n");
- return
this.report.line_errors
;
+ return ;
}
//
// startpoint:
}
//
// startpoint:
@@
-173,13
+175,15
@@
namespace Palete {
}
}
}
}
-/*
+
int main (string[] args) {
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;
}
return 0;
}
-*/
+