Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/openjdk-multiarch-jdk8u
Path: blob/aarch64-shenandoah-jdk8u272-b10/hotspot/test/aarch64/LongCmpTests.java
32282 views
1
2
public class LongCmpTests {
3
4
private static boolean test_isEq(long a, long b) {
5
return a == b;
6
}
7
8
private static boolean test_isNe(long a, long b) {
9
return a != b;
10
}
11
12
private static boolean test_isLt(long a, long b) {
13
return a < b;
14
}
15
16
private static boolean test_isLe(long a, long b) {
17
return a <= b;
18
}
19
20
private static boolean test_isGe(long a, long b) {
21
return a >= b;
22
}
23
24
private static boolean test_isGt(long a, long b) {
25
return a > b;
26
}
27
28
private static boolean test_isEqC(long a) {
29
return a == 7L;
30
}
31
32
private static boolean test_isNeC(long a) {
33
return a != 7L;
34
}
35
36
private static boolean test_isLtC(long a) {
37
return a < 7L;
38
}
39
40
private static boolean test_isLeC(long a) {
41
return a <= 7L;
42
}
43
44
private static boolean test_isGeC(long a) {
45
return a >= 7L;
46
}
47
48
private static boolean test_isGtC(long a) {
49
return a > 7L;
50
}
51
52
private static void assertThat(boolean assertion) {
53
if (! assertion) {
54
throw new AssertionError();
55
}
56
}
57
58
public static void main(String[] args) {
59
assertThat(test_isEq(7L, 7L));
60
assertThat(! test_isEq(70L, 7L));
61
assertThat(! test_isNe(7L, 7L));
62
assertThat(test_isNe(70L, 7L));
63
64
assertThat(test_isLt(7L, 70L));
65
assertThat(! test_isLt(70L, 7L));
66
assertThat(! test_isLt(7L, 7L));
67
68
assertThat(test_isLe(7L, 70L));
69
assertThat(! test_isLe(70L, 7L));
70
assertThat(test_isLe(7L, 7L));
71
72
assertThat(!test_isGe(7L, 70L));
73
assertThat(test_isGe(70L, 7L));
74
assertThat(test_isGe(7L, 7L));
75
76
assertThat(!test_isGt(7L, 70L));
77
assertThat(test_isGt(70L, 7L));
78
assertThat(! test_isGt(7L, 7L));
79
80
assertThat(test_isEqC(7L));
81
assertThat(! test_isEqC(70L));
82
assertThat(! test_isNeC(7L));
83
assertThat(test_isNeC(70L));
84
85
assertThat(test_isLtC(6L));
86
assertThat(! test_isLtC(70L));
87
assertThat(! test_isLtC(7L));
88
89
assertThat(test_isLeC(6L));
90
assertThat(! test_isLeC(70L));
91
assertThat(test_isLeC(7L));
92
93
assertThat(!test_isGeC(6L));
94
assertThat(test_isGeC(70L));
95
assertThat(test_isGeC(7L));
96
97
assertThat(!test_isGtC(6L));
98
assertThat(test_isGtC(70L));
99
assertThat(! test_isGtC(7L));
100
101
}
102
}
103
104