Mercurial > hg > graal-compiler
annotate graal/com.oracle.truffle.sl.test/tests/Comparison.sl @ 16067:915ebb306fcc
Truffle/Source: major API revision
- All source-related classes now in com.oracle.truffle.api.source
- SourceFactory replaced with factory methods on Source
- Revision, renaming, and documentation to methods on Source and SourceSection
- NullSourceSection is now a utility class
author | Michael Van De Vanter <michael.van.de.vanter@oracle.com> |
---|---|
date | Fri, 06 Jun 2014 17:51:47 -0700 |
parents | b16ec83edc73 |
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() { |
13821
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13762
diff
changeset
|
2 println("<"); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13762
diff
changeset
|
3 println(4 < 20); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13762
diff
changeset
|
4 println(40 < 2); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13762
diff
changeset
|
5 println(4 < 4); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13762
diff
changeset
|
6 println(4 < 200000000000000000000000000); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13762
diff
changeset
|
7 println(40000000000000000000000000 < 20); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13762
diff
changeset
|
8 println(40000000000000000000000000 < 200000000000000000000000000); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13762
diff
changeset
|
9 println(400000000000000000000000000 < 20000000000000000000000000); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13762
diff
changeset
|
10 println(40000000000000000000000000 < 40000000000000000000000000); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13762
diff
changeset
|
11 |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13762
diff
changeset
|
12 println("<="); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13762
diff
changeset
|
13 println(4 <= 20); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13762
diff
changeset
|
14 println(40 <= 2); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13762
diff
changeset
|
15 println(4 <= 4); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13762
diff
changeset
|
16 println(4 <= 200000000000000000000000000); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13762
diff
changeset
|
17 println(40000000000000000000000000 <= 20); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13762
diff
changeset
|
18 println(40000000000000000000000000 <= 200000000000000000000000000); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13762
diff
changeset
|
19 println(400000000000000000000000000 <= 20000000000000000000000000); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13762
diff
changeset
|
20 println(40000000000000000000000000 <= 40000000000000000000000000); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13762
diff
changeset
|
21 |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13762
diff
changeset
|
22 println(">"); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13762
diff
changeset
|
23 println(4 > 20); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13762
diff
changeset
|
24 println(40 > 2); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13762
diff
changeset
|
25 println(4 > 4); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13762
diff
changeset
|
26 println(4 > 200000000000000000000000000); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13762
diff
changeset
|
27 println(40000000000000000000000000 > 20); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13762
diff
changeset
|
28 println(40000000000000000000000000 > 200000000000000000000000000); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13762
diff
changeset
|
29 println(400000000000000000000000000 > 20000000000000000000000000); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13762
diff
changeset
|
30 println(40000000000000000000000000 > 40000000000000000000000000); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13762
diff
changeset
|
31 |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13762
diff
changeset
|
32 println(">="); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13762
diff
changeset
|
33 println(4 >= 20); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13762
diff
changeset
|
34 println(40 >= 2); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13762
diff
changeset
|
35 println(4 >= 4); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13762
diff
changeset
|
36 println(4 >= 200000000000000000000000000); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13762
diff
changeset
|
37 println(40000000000000000000000000 >= 20); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13762
diff
changeset
|
38 println(40000000000000000000000000 >= 200000000000000000000000000); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13762
diff
changeset
|
39 println(400000000000000000000000000 >= 20000000000000000000000000); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13762
diff
changeset
|
40 println(40000000000000000000000000 >= 40000000000000000000000000); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13762
diff
changeset
|
41 |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13762
diff
changeset
|
42 println("=="); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13762
diff
changeset
|
43 println(4 == 20); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13762
diff
changeset
|
44 println(40 == 2); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13762
diff
changeset
|
45 println(4 == 4); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13762
diff
changeset
|
46 println(4 == 200000000000000000000000000); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13762
diff
changeset
|
47 println(40000000000000000000000000 == 20); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13762
diff
changeset
|
48 println(40000000000000000000000000 == 200000000000000000000000000); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13762
diff
changeset
|
49 println(400000000000000000000000000 == 20000000000000000000000000); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13762
diff
changeset
|
50 println(40000000000000000000000000 == 40000000000000000000000000); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13762
diff
changeset
|
51 |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13762
diff
changeset
|
52 println("!="); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13762
diff
changeset
|
53 println(4 != 20); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13762
diff
changeset
|
54 println(40 != 2); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13762
diff
changeset
|
55 println(4 != 4); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13762
diff
changeset
|
56 println(4 != 200000000000000000000000000); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13762
diff
changeset
|
57 println(40000000000000000000000000 != 20); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13762
diff
changeset
|
58 println(40000000000000000000000000 != 200000000000000000000000000); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13762
diff
changeset
|
59 println(400000000000000000000000000 != 20000000000000000000000000); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13762
diff
changeset
|
60 println(40000000000000000000000000 != 40000000000000000000000000); |
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
|
61 } |