Skip to main content

module examples::ql::Test

rascal-0.40.16
typepal-0.14.8

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, modelName = "ql");
}

function qlTModelForTree

TModel qlTModelForTree(Tree pt) {
return collectAndSolve(pt, modelName = "ql");
}

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");
}