• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2007 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 public class Blort
18 {
sink(int i)19     public static void sink(int i) {
20         // Do nothing.
21     }
22 
sink(long l)23     public static void sink(long l) {
24         // Do nothing.
25     }
26 
sink(float f)27     public static void sink(float f) {
28         // Do nothing.
29     }
30 
sink(double d)31     public static void sink(double d) {
32         // Do nothing.
33     }
34 
testInt()35     public static void testInt() {
36         sink(Integer.MIN_VALUE);
37         sink(0x40000000);
38         sink(0x20000000);
39         sink(0x10000000);
40         sink(0x00080000);
41         sink(0x00040000);
42         sink(0x00020000);
43         sink(0x00010000);
44         sink(0x56780000);
45     }
46 
testLong()47     public static void testLong() {
48         sink(Long.MIN_VALUE);
49         sink(0x4000000000000000L);
50         sink(0x2000000000000000L);
51         sink(0x1000000000000000L);
52         sink(0x0008000000000000L);
53         sink(0x0004000000000000L);
54         sink(0x0002000000000000L);
55         sink(0x0001000000000000L);
56         sink(0x5678000000000000L);
57     }
58 
testFloat()59     public static void testFloat() {
60         sink(Float.NEGATIVE_INFINITY);
61         sink(-0.0f);
62         sink(1.0f);
63         sink(Float.POSITIVE_INFINITY);
64         sink(Float.NaN);
65     }
66 
testDouble()67     public static void testDouble() {
68         sink(Double.NEGATIVE_INFINITY);
69         sink(-0.0);
70         sink(1.0);
71         sink(Double.POSITIVE_INFINITY);
72         sink(Double.NaN);
73     }
74 }
75