module examples::aliases::Test
rascal-0.40.16
typepal-0.14.8
Usage
import examples::aliases::Test;
Source code
http://github.com/usethesource/typepal/src/examples/aliases/Test.rsc
Dependencies
import examples::aliases::Syntax;
extend examples::aliases::Checker;
extend analysis::typepal::TestFramework;
import ParseTree;
function aliasesTModelForTree
TModel aliasesTModelForTree(Tree pt){
return collectAndSolve(pt, config = aliasesConfig(), modelName = "alias");
}
function aliasesTModelFromName
TModel aliasesTModelFromName(str mname){
pt = parse(#start[Program], |project://typepal/src/examples/aliases/<mname>.alias|).top;
return aliasesTModelForTree(pt);
}
function main
bool main() = aliasesTests();
Tests
test aliasesTests
test bool aliasesTests() {
return runTests([|project://typepal/src/examples/aliases/aliases.ttl|],
#start[Program],
TModel (Tree t) { return aliasesTModelForTree(t); },
runName = "Aliases");
}