module examples::pico::Test
rascal-0.40.16
typepal-0.14.8
Usage
import examples::pico::Test;
Source code
http://github.com/usethesource/typepal/src/examples/pico/Test.rsc
Dependencies
import examples::pico::Syntax;
extend examples::pico::Checker;
extend analysis::typepal::TestFramework;
import ParseTree;
function picoTModelFromName
TModel picoTModelFromName(str name) {
Tree pt = parse(#start[Program], |project://typepal/src/examples/pico/<name>.pico|);
return collectAndSolve(pt, modelName="pico");
}
function picoTModelForTree
TModel picoTModelForTree(Tree pt) {
return collectAndSolve(pt, modelName="pico");
}
function main
value main()
= picoTests();
Tests
test picoTests
test bool picoTests() {
return runTests([|project://typepal/src/examples/pico/tests.ttl|],
#start[Program],
TModel (Tree t) { return picoTModelForTree(t); },
runName = "Pico");
}