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