Skip to main content

module examples::fixedMembers::Test

rascal-0.40.16
typepal-0.14.8

Usage

import examples::fixedMembers::Test;

Source code

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

Dependencies

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

function fixedMembersTModelForTree

TModel fixedMembersTModelForTree(Tree pt){
return collectAndSolve(pt, config = fixedMembersConfig(), modelName="fixed-members");
}

function fixedMembersTModelFromName

TModel fixedMembersTModelFromName(str mname){
pt = parse(#start[Program], |project://typepal/src/examples/fixedMembers/<mname>.alias|).top;
return fixedMembersTModelForTree(pt);
}

function main

bool main() = fixedMembersTests();

Tests

test fixedMembersTests

test bool fixedMembersTests() {
return runTests([|project://typepal/src/examples/fixedMembers/fixedMembers.ttl|],
#start[Program],
TModel (Tree t) { return fixedMembersTModelForTree(t); },
runName = "fixedMembers");
}