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