1 # This file is part of NIT ( http://www.nitlanguage.org ).
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
17 fun get_float
(f
: Float): Float do return f
18 fun get_object
(f
: Float): Object do return f
20 var fp
: Float = get_float
(0.0)
21 var fm
: Float = get_float
(-0.0)
22 var f1
: Float = get_float
(1.0)
23 var ofp
: Object = get_float
(0.0)
24 var ofm
: Object = get_float
(-0.0)
25 var of1
: Object = get_float
(1.0)
26 var op
: Object = get_object
(0.0)
27 var om
: Object = get_object
(-0.0)
28 var o1
: Object = get_object
(1.0)
40 (fp
.is_same_instance
(fp
)).output
41 (fp
.is_same_instance
(fm
)).output
42 (not fp
.is_same_instance
(f1
)).output
43 (fp
.is_same_instance
(ofp
)).output
44 (fp
.is_same_instance
(ofm
)).output
45 (not fp
.is_same_instance
(of1
)).output
46 (fp
.is_same_instance
(op
)).output
47 (fp
.is_same_instance
(om
)).output
48 (not fp
.is_same_instance
(o1
)).output
50 (fm
.is_same_instance
(fp
)).output
51 (fm
.is_same_instance
(fm
)).output
52 (not fm
.is_same_instance
(f1
)).output
53 (fm
.is_same_instance
(ofp
)).output
54 (fm
.is_same_instance
(ofm
)).output
55 (not fm
.is_same_instance
(of1
)).output
56 (fm
.is_same_instance
(op
)).output
57 (fm
.is_same_instance
(om
)).output
58 (not fm
.is_same_instance
(o1
)).output
60 (ofp
.is_same_instance
(fp
)).output
61 (ofp
.is_same_instance
(fm
)).output
62 (not ofp
.is_same_instance
(f1
)).output
63 (ofp
.is_same_instance
(ofp
)).output
64 (ofp
.is_same_instance
(ofm
)).output
65 (not ofp
.is_same_instance
(of1
)).output
66 (ofp
.is_same_instance
(op
)).output
67 (ofp
.is_same_instance
(om
)).output
68 (not ofp
.is_same_instance
(o1
)).output
70 (ofm
.is_same_instance
(fp
)).output
71 (ofm
.is_same_instance
(fm
)).output
72 (not ofm
.is_same_instance
(f1
)).output
73 (ofm
.is_same_instance
(ofp
)).output
74 (ofm
.is_same_instance
(ofm
)).output
75 (not ofm
.is_same_instance
(of1
)).output
76 (ofm
.is_same_instance
(op
)).output
77 (ofm
.is_same_instance
(om
)).output
78 (not ofm
.is_same_instance
(o1
)).output
80 (op
.is_same_instance
(fp
)).output
81 (op
.is_same_instance
(fm
)).output
82 (not op
.is_same_instance
(f1
)).output
83 (op
.is_same_instance
(ofp
)).output
84 (op
.is_same_instance
(ofm
)).output
85 (not op
.is_same_instance
(of1
)).output
86 (op
.is_same_instance
(op
)).output
87 (op
.is_same_instance
(om
)).output
88 (not op
.is_same_instance
(o1
)).output
90 (om
.is_same_instance
(fp
)).output
91 (om
.is_same_instance
(fm
)).output
92 (not om
.is_same_instance
(f1
)).output
93 (om
.is_same_instance
(ofp
)).output
94 (om
.is_same_instance
(ofm
)).output
95 (not om
.is_same_instance
(of1
)).output
96 (om
.is_same_instance
(op
)).output
97 (om
.is_same_instance
(om
)).output
98 (not om
.is_same_instance
(o1
)).output