Skip to main content

module examples::aliases::Test

rascal-0.34.0
typepal-0.8.10

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

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