Skip to main content

module examples::untypedFun::Test

rascal-0.40.16
typepal-0.14.8

Usage

import examples::untypedFun::Test;

Source code

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

Dependencies

import examples::untypedFun::Syntax;
extend examples::untypedFun::Checker;
extend analysis::typepal::TestFramework;

function sample

private Expression sample(str name) = parse(#start[Expression], |project://typepal/src/examples/untypedFun/<name>.ufun|).top;

function untypedFunCheck

list[Message] untypedFunCheck(str name){
return untypedFunTModelForTree(sample(name)).messages;
}

function untypedFunTModelForTree

TModel untypedFunTModelForTree(Tree pt)
= collectAndSolve(pt, modelName="ufun");

function main

value main() = untypedFunTests();

Tests

test untypedFunTests

test bool untypedFunTests()
= runTests([|project://typepal/src/examples/untypedFun/tests.ttl|], #Expression, untypedFunTModelForTree, runName="UntypedFun");