Skip to main content

module examples::splitstruct::Test

rascal-0.40.16
typepal-0.14.8

Usage

import examples::splitstruct::Test;

Source code

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

Dependencies

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

function splitstructTModelForTree

TModel splitstructTModelForTree(Tree pt){
return collectAndSolve(pt, config = splitstructConfig(), modelName="splitstruct");
}

function splitstructTModelFromName

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

function main

value main()
= splitstructTests();

Tests

test splitstructTests

test bool splitstructTests() {
return runTests([|project://typepal/src/examples/splitstruct/tests.ttl|],
#start[Program],
TModel (Tree t) { return splitstructTModelForTree(t); },
runName = "SplitStruct");
}