module examples::smallOO::Test
rascal-0.40.16
typepal-0.14.8
Usage
import examples::smallOO::Test;
Source code
http://github.com/usethesource/typepal/src/examples/smallOO/Test.rsc
Dependencies
import examples::smallOO::Syntax;
extend examples::smallOO::Checker;
extend analysis::typepal::TestFramework;
import ParseTree;
function smallOOTModelForTree
TModel smallOOTModelForTree(Tree pt){
return collectAndSolve(pt, config=smallConfig(), modelName="smalloo");
}
function smallOOTModelFromName
TModel smallOOTModelFromName(str mname){
pt = parse(#start[Module], |project://typepal/src/examples/smallOO/<mname>.small|).top;
return smallOOTModelForTree(pt);
}
function checkSmallOO
list[Message] checkSmallOO(str mname) {
return smallOOTModelFromName(mname).messages;
}
function main
value main()
= smallOOTests();
Tests
test smallOOTests
test bool smallOOTests() {
return runTests([|project://typepal/src/examples/smallOO/tests.ttl|],
#start[Module],
TModel (Tree t) { return smallOOTModelForTree(t); },
runName = "SmallOO");
}