Skip to main content

module examples::ql::Test

rascal-0.34.0
typepal-0.8.10

Usage

import examples::ql::Test;

Source code

http://github.com/usethesource/typepal/src/examples/ql/Test.rsc

Dependencies

import examples::ql::Syntax;
extend examples::ql::Checker;
extend analysis::typepal::TestFramework;
import ParseTree;

function qlTModelForName

TModel qlTModelForName(str name) {
Tree pt = parse(#start[Form], |project://typepal/src/examples/ql/examples/<name>.ql|);
return collectAndSolve(pt);
}

function qlTModelForTree

TModel qlTModelForTree(Tree pt) {
return collectAndSolve(pt);
}

function main

value main()
= qlTests();

Tests

test qlTests

test bool qlTests() {
return runTests([|project://typepal/src/examples/ql/tests.ttl|], #start[Form],
TModel (Tree t) { return qlTModelForTree(t); },
runName = "QL");
}