Mercurial > hg > graal-jvmci-8
comparison graal/com.oracle.truffle.sl.test/tests/Call.sl @ 13762:e34d5cca7496
Use source and expected output files to test Simple Language, instead of individual JUnit tests with the source and expected output as strings
author | Christian Wimmer <christian.wimmer@oracle.com> |
---|---|
date | Fri, 24 Jan 2014 18:18:49 -0800 |
parents | |
children | b16ec83edc73 |
comparison
equal
deleted
inserted
replaced
13761:7c418666c6c9 | 13762:e34d5cca7496 |
---|---|
1 function ret(a) { return a; } | |
2 function dub(a) { return a * 2; } | |
3 function inc(a) { return a + 1; } | |
4 function dec(a) { return a - 1; } | |
5 function call(f, v) { return f(v); } | |
6 | |
7 function main() { | |
8 print(ret(42)); | |
9 print(dub(21)); | |
10 print(inc(41)); | |
11 print(dec(43)); | |
12 print(call(ret, 42)); | |
13 print(call(dub, 21)); | |
14 print(call(inc, 41)); | |
15 print(call(dec, 43)); | |
16 } |