Skip to main content

module examples::staticFields::Test

rascal-0.40.16
typepal-0.14.8

Usage

import examples::staticFields::Test;

Source code

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

Dependencies

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

function staticFieldsTModelForTree

TModel staticFieldsTModelForTree(Tree pt){
return collectAndSolve(pt, config=staticFieldsConfig(), modelName="staticfields");
}

function staticFieldsTModelFromName

TModel staticFieldsTModelFromName(str mname){
pt = parse(#start[Program], |project://typepal/src/examples/staticFields/<mname>.struct|).top;
return staticFieldsTModelForTree(pt);
}

function main

value main()
= staticFieldsTests();

Tests

test staticFieldsTests

test bool staticFieldsTests() {
return runTests([|project://typepal/src/examples/staticFields/tests.ttl|],
#start[Program],
TModel (Tree t) { return staticFieldsTModelForTree(t); },
runName = "StaticFields");
}