Path: blob/aarch64-shenandoah-jdk8u272-b10/hotspot/test/aarch64/LongCmpTests.java
32282 views
1public class LongCmpTests {23private static boolean test_isEq(long a, long b) {4return a == b;5}67private static boolean test_isNe(long a, long b) {8return a != b;9}1011private static boolean test_isLt(long a, long b) {12return a < b;13}1415private static boolean test_isLe(long a, long b) {16return a <= b;17}1819private static boolean test_isGe(long a, long b) {20return a >= b;21}2223private static boolean test_isGt(long a, long b) {24return a > b;25}2627private static boolean test_isEqC(long a) {28return a == 7L;29}3031private static boolean test_isNeC(long a) {32return a != 7L;33}3435private static boolean test_isLtC(long a) {36return a < 7L;37}3839private static boolean test_isLeC(long a) {40return a <= 7L;41}4243private static boolean test_isGeC(long a) {44return a >= 7L;45}4647private static boolean test_isGtC(long a) {48return a > 7L;49}5051private static void assertThat(boolean assertion) {52if (! assertion) {53throw new AssertionError();54}55}5657public static void main(String[] args) {58assertThat(test_isEq(7L, 7L));59assertThat(! test_isEq(70L, 7L));60assertThat(! test_isNe(7L, 7L));61assertThat(test_isNe(70L, 7L));6263assertThat(test_isLt(7L, 70L));64assertThat(! test_isLt(70L, 7L));65assertThat(! test_isLt(7L, 7L));6667assertThat(test_isLe(7L, 70L));68assertThat(! test_isLe(70L, 7L));69assertThat(test_isLe(7L, 7L));7071assertThat(!test_isGe(7L, 70L));72assertThat(test_isGe(70L, 7L));73assertThat(test_isGe(7L, 7L));7475assertThat(!test_isGt(7L, 70L));76assertThat(test_isGt(70L, 7L));77assertThat(! test_isGt(7L, 7L));7879assertThat(test_isEqC(7L));80assertThat(! test_isEqC(70L));81assertThat(! test_isNeC(7L));82assertThat(test_isNeC(70L));8384assertThat(test_isLtC(6L));85assertThat(! test_isLtC(70L));86assertThat(! test_isLtC(7L));8788assertThat(test_isLeC(6L));89assertThat(! test_isLeC(70L));90assertThat(test_isLeC(7L));9192assertThat(!test_isGeC(6L));93assertThat(test_isGeC(70L));94assertThat(test_isGeC(7L));9596assertThat(!test_isGtC(6L));97assertThat(test_isGtC(70L));98assertThat(! test_isGtC(7L));99100}101}102103104