First NIT release and new clean mercurial repository
[nit.git] / tests / base_eq_int.nit
1 # This file is part of NIT ( http://www.nitlanguage.org ).
2 #
3 # Copyright 2006-2008 Jean Privat <jean@pryen.org>
4 #
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
8 #
9 # http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16
17 import kernel
18
19 var a = 5
20 var b = 5
21 var c: Object = 5
22 var d: Object = 6
23 var e: Object = 5.0
24
25 (5 == 5).output
26 (not 5 == 5.0).output
27 (5.0 == 5.0).output
28 (not 5.0 == 5).output
29 (not 6 == 5).output
30 (not 6 == 5.0).output
31 (not 6.0 == 5.0).output
32 (not 6.0 == 5).output
33
34 '\n'.output
35
36 (a is 5).output
37 (not a is 6).output
38 (a is a).output
39 (a is b).output
40 (a is c).output
41 (not a is d).output
42 (not a is e).output
43
44 '\n'.output
45
46 (a == 5).output
47 (not a == 6).output
48 (a == a).output
49 (a == b).output
50 (a == c).output
51 (not a == d).output
52 (not a == e).output
53
54 '\n'.output
55
56 (c is 5).output
57 (not c is 6).output
58 (c is a).output
59 (c is b).output
60 (c is c).output
61 (not c is d).output
62 (not c is e).output
63
64 '\n'.output
65
66 (c == 5).output
67 (not c == 6).output
68 (c == a).output
69 (c == b).output
70 (c == c).output
71 (not c == d).output
72 (not c == e).output
73