Mercurial > hg > truffle
diff truffle/com.oracle.truffle.sl.test/src/tests/DefineFunction.sl @ 22201:df6a1647cfb3
Move .sl testcases/outputs (resources) into projects src directory
author | Stefan Anzinger <stefan.anzinger@oracle.com> |
---|---|
date | Tue, 29 Sep 2015 15:01:34 +0200 |
parents | truffle/com.oracle.truffle.sl.test/tests/DefineFunction.sl@9c8c0937da41 |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/truffle/com.oracle.truffle.sl.test/src/tests/DefineFunction.sl Tue Sep 29 15:01:34 2015 +0200 @@ -0,0 +1,11 @@ +function foo() { + println(test(40, 2)); +} + +function main() { + defineFunction("function test(a, b) { return a + b; }"); + foo(); + + defineFunction("function test(a, b) { return a - b; }"); + foo(); +}