Mercurial > hg > graal-compiler
annotate graal/com.oracle.truffle.sl.test/tests/Sum.sl @ 21673:5024c80224c7
moved com.oracle.graal.[amd64|sparc] to com.oracle.jvmci.[amd64|sparc] (JBS:GRAAL-53)
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Tue, 02 Jun 2015 22:11:52 +0200 |
parents | ff3136ecb5a7 |
children |
rev | line source |
---|---|
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
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff
changeset
|
1 function main() { |
e34d5cca7496
Use source and expected output files to test Simple Language, instead of individual JUnit tests with the source and expected output as strings
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff
changeset
|
2 i = 0; |
e34d5cca7496
Use source and expected output files to test Simple Language, instead of individual JUnit tests with the source and expected output as strings
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff
changeset
|
3 sum = 0; |
13883
ff3136ecb5a7
SL: small changes
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13762
diff
changeset
|
4 while (i <= 10000) { |
ff3136ecb5a7
SL: small changes
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13762
diff
changeset
|
5 sum = sum + i; |
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
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff
changeset
|
6 i = i + 1; |
e34d5cca7496
Use source and expected output files to test Simple Language, instead of individual JUnit tests with the source and expected output as strings
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff
changeset
|
7 } |
e34d5cca7496
Use source and expected output files to test Simple Language, instead of individual JUnit tests with the source and expected output as strings
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff
changeset
|
8 return sum; |
e34d5cca7496
Use source and expected output files to test Simple Language, instead of individual JUnit tests with the source and expected output as strings
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff
changeset
|
9 } |