module examples::fwjava::Test
rascal-0.40.16
typepal-0.14.8
Usage
import examples::fwjava::Test;
Source code
http://github.com/usethesource/typepal/src/examples/fwjava/Test.rsc
Dependencies
import examples::fwjava::Syntax;
extend examples::fwjava::Checker;
extend analysis::typepal::TestFramework;
import ParseTree;
function fwjTModelForTree
TModel fwjTModelForTree(Tree pt){
if(pt has top) pt = pt.top;
c = newCollector("fwj", pt, fwjConfig());
fwjPreCollectInitialization(pt, c);
collect(pt, c);
return newSolver(pt, c.run()).run();
}
function fwjTModelFromName
TModel fwjTModelFromName(str mname, bool _){
pt = parse(#start[FWJProgram], |project://typepal/src/examples/fwjava/<mname>.fwj|).top;
return fwjTModelForTree(pt);
}
function main
value main() = fwjTests();
Tests
test fwjTests
test bool fwjTests() {
return runTests([|project://typepal/src/examples/fwjava/tests.ttl|],
#start[FWJProgram],
TModel (Tree t) { return fwjTModelForTree(t); },
runName = "FwJava");
}