diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refastertemplates/AssertJComparableTemplates.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refastertemplates/AssertJComparableTemplates.java new file mode 100644 index 0000000000..2d63f665da --- /dev/null +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refastertemplates/AssertJComparableTemplates.java @@ -0,0 +1,92 @@ +package tech.picnic.errorprone.refastertemplates; + +import static com.google.errorprone.refaster.ImportPolicy.STATIC_IMPORT_ALWAYS; +import static org.assertj.core.api.Assertions.assertThat; + +import com.google.errorprone.refaster.annotation.AfterTemplate; +import com.google.errorprone.refaster.annotation.BeforeTemplate; +import com.google.errorprone.refaster.annotation.UseImportPolicy; +import org.assertj.core.api.AbstractComparableAssert; +import org.assertj.core.api.AbstractIntegerAssert; + +final class AssertJComparableTemplates { + private AssertJComparableTemplates() {} + + static final class AssertThatIsEqualByComparingTo> { + @BeforeTemplate + AbstractIntegerAssert before(T actual, T expected) { + return assertThat(actual.compareTo(expected)).isEqualTo(0); + } + + @AfterTemplate + @UseImportPolicy(STATIC_IMPORT_ALWAYS) + AbstractComparableAssert after(T actual, T expected) { + return assertThat(actual).isEqualByComparingTo(expected); + } + } + + static final class AssertThatIsNotEqualByComparingTo> { + @BeforeTemplate + AbstractIntegerAssert before(T actual, T expected) { + return assertThat(actual.compareTo(expected)).isNotEqualTo(0); + } + + @AfterTemplate + @UseImportPolicy(STATIC_IMPORT_ALWAYS) + AbstractComparableAssert after(T actual, T expected) { + return assertThat(actual).isNotEqualByComparingTo(expected); + } + } + + static final class AssertThatIsLessThan> { + @BeforeTemplate + AbstractIntegerAssert before(T actual, T expected) { + return assertThat(actual.compareTo(expected)).isNegative(); + } + + @AfterTemplate + @UseImportPolicy(STATIC_IMPORT_ALWAYS) + AbstractComparableAssert after(T actual, T expected) { + return assertThat(actual).isLessThan(expected); + } + } + + static final class AssertThatIsLessThanOrEqualTo> { + @BeforeTemplate + AbstractIntegerAssert before(T actual, T expected) { + return assertThat(actual.compareTo(expected)).isNotPositive(); + } + + @AfterTemplate + @UseImportPolicy(STATIC_IMPORT_ALWAYS) + AbstractComparableAssert after(T actual, T expected) { + return assertThat(actual).isLessThanOrEqualTo(expected); + } + } + + static final class AssertThatIsGreaterThan> { + @BeforeTemplate + AbstractIntegerAssert before(T actual, T expected) { + return assertThat(actual.compareTo(expected)).isPositive(); + } + + @AfterTemplate + @UseImportPolicy(STATIC_IMPORT_ALWAYS) + AbstractComparableAssert after(T actual, T expected) { + return assertThat(actual).isGreaterThan(expected); + } + } + + static final class AssertThatIsGreaterThanOrEqualTo> { + @BeforeTemplate + AbstractIntegerAssert before(T actual, T expected) { + return assertThat(actual.compareTo(expected)).isNotNegative(); + } + + @AfterTemplate + @UseImportPolicy(STATIC_IMPORT_ALWAYS) + AbstractComparableAssert after(T actual, T expected) { + return assertThat(actual).isGreaterThanOrEqualTo(expected); + } + } +} diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refastertemplates/AssertJPrimitiveTemplates.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refastertemplates/AssertJPrimitiveTemplates.java new file mode 100644 index 0000000000..b58a703c71 --- /dev/null +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refastertemplates/AssertJPrimitiveTemplates.java @@ -0,0 +1,111 @@ +package tech.picnic.errorprone.refastertemplates; + +import static com.google.errorprone.refaster.ImportPolicy.STATIC_IMPORT_ALWAYS; +import static org.assertj.core.api.Assertions.assertThat; + +import com.google.errorprone.refaster.Refaster; +import com.google.errorprone.refaster.annotation.AfterTemplate; +import com.google.errorprone.refaster.annotation.BeforeTemplate; +import com.google.errorprone.refaster.annotation.UseImportPolicy; +import org.assertj.core.api.AbstractBooleanAssert; +import org.assertj.core.api.AbstractDoubleAssert; + +final class AssertJPrimitiveTemplates { + private AssertJPrimitiveTemplates() {} + + static final class AssertThatIsEqualTo { + @BeforeTemplate + AbstractBooleanAssert before(boolean actual, boolean expected) { + return Refaster.anyOf( + assertThat(actual == expected).isTrue(), assertThat(actual != expected).isFalse()); + } + + @BeforeTemplate + AbstractBooleanAssert before(double actual, double expected) { + return Refaster.anyOf( + assertThat(actual == expected).isTrue(), assertThat(actual != expected).isFalse()); + } + + @AfterTemplate + @UseImportPolicy(STATIC_IMPORT_ALWAYS) + AbstractBooleanAssert after(boolean actual, boolean expected) { + return assertThat(actual).isEqualTo(expected); + } + } + + static final class AssertThatIsNotEqualTo { + @BeforeTemplate + AbstractBooleanAssert before(boolean actual, boolean expected) { + return Refaster.anyOf( + assertThat(actual != expected).isTrue(), assertThat(actual == expected).isFalse()); + } + + @BeforeTemplate + AbstractBooleanAssert before(double actual, double expected) { + return Refaster.anyOf( + assertThat(actual != expected).isTrue(), assertThat(actual == expected).isFalse()); + } + + @AfterTemplate + @UseImportPolicy(STATIC_IMPORT_ALWAYS) + AbstractBooleanAssert after(boolean actual, boolean expected) { + return assertThat(actual).isNotEqualTo(expected); + } + } + + static final class AssertThatIsLessThan { + @BeforeTemplate + AbstractBooleanAssert before(double actual, double expected) { + return Refaster.anyOf( + assertThat(actual < expected).isTrue(), assertThat(actual >= expected).isFalse()); + } + + @AfterTemplate + @UseImportPolicy(STATIC_IMPORT_ALWAYS) + AbstractDoubleAssert after(double actual, double expected) { + return assertThat(actual).isLessThan(expected); + } + } + + static final class AssertThatIsLessThanOrEqualTo { + @BeforeTemplate + AbstractBooleanAssert before(double actual, double expected) { + return Refaster.anyOf( + assertThat(actual <= expected).isTrue(), assertThat(actual > expected).isFalse()); + } + + @AfterTemplate + @UseImportPolicy(STATIC_IMPORT_ALWAYS) + AbstractDoubleAssert after(double actual, double expected) { + return assertThat(actual).isLessThanOrEqualTo(expected); + } + } + + static final class AssertThatIsGreaterThan { + @BeforeTemplate + AbstractBooleanAssert before(double actual, double expected) { + return Refaster.anyOf( + assertThat(actual > expected).isTrue(), assertThat(actual <= expected).isFalse()); + } + + @AfterTemplate + @UseImportPolicy(STATIC_IMPORT_ALWAYS) + AbstractDoubleAssert after(double actual, double expected) { + return assertThat(actual).isGreaterThan(expected); + } + } + + static final class AssertThatIsGreaterThanOrEqualTo { + @BeforeTemplate + AbstractBooleanAssert before(double actual, double expected) { + return Refaster.anyOf( + assertThat(actual >= expected).isTrue(), assertThat(actual < expected).isFalse()); + } + + @AfterTemplate + @UseImportPolicy(STATIC_IMPORT_ALWAYS) + AbstractDoubleAssert after(double actual, double expected) { + return assertThat(actual).isGreaterThanOrEqualTo(expected); + } + } +} diff --git a/error-prone-contrib/src/test/java/tech/picnic/errorprone/refastertemplates/RefasterTemplatesTest.java b/error-prone-contrib/src/test/java/tech/picnic/errorprone/refastertemplates/RefasterTemplatesTest.java index 7b78e49475..b739216bcd 100644 --- a/error-prone-contrib/src/test/java/tech/picnic/errorprone/refastertemplates/RefasterTemplatesTest.java +++ b/error-prone-contrib/src/test/java/tech/picnic/errorprone/refastertemplates/RefasterTemplatesTest.java @@ -19,6 +19,7 @@ final class RefasterTemplatesTest { AssertJBooleanTemplates.class, AssertJByteTemplates.class, AssertJCharSequenceTemplates.class, + AssertJComparableTemplates.class, AssertJDoubleTemplates.class, AssertJEnumerableTemplates.class, AssertJFloatTemplates.class, @@ -28,6 +29,7 @@ final class RefasterTemplatesTest { AssertJMapTemplates.class, AssertJObjectTemplates.class, AssertJOptionalTemplates.class, + AssertJPrimitiveTemplates.class, AssertJShortTemplates.class, AssertJStringTemplates.class, AssertJThrowingCallableTemplates.class, diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJComparableTemplatesTestInput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJComparableTemplatesTestInput.java new file mode 100644 index 0000000000..9d3793f23d --- /dev/null +++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJComparableTemplatesTestInput.java @@ -0,0 +1,33 @@ +package tech.picnic.errorprone.refastertemplates; + +import static org.assertj.core.api.Assertions.assertThat; + +import java.math.BigDecimal; +import org.assertj.core.api.AbstractComparableAssert; +import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase; + +final class AssertJComparableTemplatesTest implements RefasterTemplateTestCase { + AbstractComparableAssert testAssertThatIsEqualByComparingTo() { + return assertThat(BigDecimal.ZERO.compareTo(BigDecimal.ONE)).isEqualTo(0); + } + + AbstractComparableAssert testAssertThatIsNotEqualByComparingTo() { + return assertThat(BigDecimal.ZERO.compareTo(BigDecimal.ONE)).isNotEqualTo(0); + } + + AbstractComparableAssert testAssertThatIsLessThan() { + return assertThat(BigDecimal.ZERO.compareTo(BigDecimal.ONE)).isNegative(); + } + + AbstractComparableAssert testAssertThatIsLessThanOrEqualTo() { + return assertThat(BigDecimal.ZERO.compareTo(BigDecimal.ONE)).isNotPositive(); + } + + AbstractComparableAssert testAssertThatIsGreaterThan() { + return assertThat(BigDecimal.ZERO.compareTo(BigDecimal.ONE)).isPositive(); + } + + AbstractComparableAssert testAssertThatIsGreaterThanOrEqualTo() { + return assertThat(BigDecimal.ZERO.compareTo(BigDecimal.ONE)).isNotNegative(); + } +} diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJComparableTemplatesTestOutput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJComparableTemplatesTestOutput.java new file mode 100644 index 0000000000..8ff2093d8d --- /dev/null +++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJComparableTemplatesTestOutput.java @@ -0,0 +1,33 @@ +package tech.picnic.errorprone.refastertemplates; + +import static org.assertj.core.api.Assertions.assertThat; + +import java.math.BigDecimal; +import org.assertj.core.api.AbstractComparableAssert; +import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase; + +final class AssertJComparableTemplatesTest implements RefasterTemplateTestCase { + AbstractComparableAssert testAssertThatIsEqualByComparingTo() { + return assertThat(BigDecimal.ZERO).isEqualByComparingTo(BigDecimal.ONE); + } + + AbstractComparableAssert testAssertThatIsNotEqualByComparingTo() { + return assertThat(BigDecimal.ZERO).isNotEqualByComparingTo(BigDecimal.ONE); + } + + AbstractComparableAssert testAssertThatIsLessThan() { + return assertThat(BigDecimal.ZERO).isLessThan(BigDecimal.ONE); + } + + AbstractComparableAssert testAssertThatIsLessThanOrEqualTo() { + return assertThat(BigDecimal.ZERO).isLessThanOrEqualTo(BigDecimal.ONE); + } + + AbstractComparableAssert testAssertThatIsGreaterThan() { + return assertThat(BigDecimal.ZERO).isGreaterThan(BigDecimal.ONE); + } + + AbstractComparableAssert testAssertThatIsGreaterThanOrEqualTo() { + return assertThat(BigDecimal.ZERO).isGreaterThanOrEqualTo(BigDecimal.ONE); + } +} diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJPrimitiveTemplatesTestInput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJPrimitiveTemplatesTestInput.java new file mode 100644 index 0000000000..ace0e0e6c3 --- /dev/null +++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJPrimitiveTemplatesTestInput.java @@ -0,0 +1,123 @@ +package tech.picnic.errorprone.refastertemplates; + +import static org.assertj.core.api.Assertions.assertThat; + +import com.google.common.collect.ImmutableSet; +import org.assertj.core.api.AbstractAssert; +import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase; + +final class AssertJPrimitiveTemplatesTest implements RefasterTemplateTestCase { + @SuppressWarnings("SimplifyBooleanExpression") + ImmutableSet> testAssertThatIsEqualTo() { + return ImmutableSet.of( + assertThat(true == false).isTrue(), + assertThat(true != false).isFalse(), + assertThat((byte) 1 == (byte) 2).isTrue(), + assertThat((byte) 1 != (byte) 2).isFalse(), + assertThat((char) 1 == (char) 2).isTrue(), + assertThat((char) 1 != (char) 2).isFalse(), + assertThat((short) 1 == (short) 2).isTrue(), + assertThat((short) 1 != (short) 2).isFalse(), + assertThat(1 == 2).isTrue(), + assertThat(1 != 2).isFalse(), + assertThat(1L == 2L).isTrue(), + assertThat(1L != 2L).isFalse(), + assertThat(1F == 2F).isTrue(), + assertThat(1F != 2F).isFalse(), + assertThat(1.0 == 2.0).isTrue(), + assertThat(1.0 != 2.0).isFalse()); + } + + @SuppressWarnings("SimplifyBooleanExpression") + ImmutableSet> testAssertThatIsNotEqualTo() { + return ImmutableSet.of( + assertThat(true != false).isTrue(), + assertThat(true == false).isFalse(), + assertThat((byte) 1 != (byte) 2).isTrue(), + assertThat((byte) 1 == (byte) 2).isFalse(), + assertThat((char) 1 != (char) 2).isTrue(), + assertThat((char) 1 == (char) 2).isFalse(), + assertThat((short) 1 != (short) 2).isTrue(), + assertThat((short) 1 == (short) 2).isFalse(), + assertThat(1 != 2).isTrue(), + assertThat(1 == 2).isFalse(), + assertThat(1L != 2L).isTrue(), + assertThat(1L == 2L).isFalse(), + assertThat(1F != 2F).isTrue(), + assertThat(1F == 2F).isFalse(), + assertThat(1.0 != 2.0).isTrue(), + assertThat(1.0 == 2.0).isFalse()); + } + + ImmutableSet> testAssertThatIsLessThan() { + return ImmutableSet.of( + assertThat((byte) 1 < (byte) 2).isTrue(), + assertThat((byte) 1 >= (byte) 2).isFalse(), + assertThat((char) 1 < (char) 2).isTrue(), + assertThat((char) 1 >= (char) 2).isFalse(), + assertThat((short) 1 < (short) 2).isTrue(), + assertThat((short) 1 >= (short) 2).isFalse(), + assertThat(1 < 2).isTrue(), + assertThat(1 >= 2).isFalse(), + assertThat(1L < 2L).isTrue(), + assertThat(1L >= 2L).isFalse(), + assertThat(1F < 2F).isTrue(), + assertThat(1F >= 2F).isFalse(), + assertThat(1.0 < 2.0).isTrue(), + assertThat(1.0 >= 2.0).isFalse()); + } + + ImmutableSet> testAssertThatIsLessThanOrEqualTo() { + return ImmutableSet.of( + assertThat((byte) 1 <= (byte) 2).isTrue(), + assertThat((byte) 1 > (byte) 2).isFalse(), + assertThat((char) 1 <= (char) 2).isTrue(), + assertThat((char) 1 > (char) 2).isFalse(), + assertThat((short) 1 <= (short) 2).isTrue(), + assertThat((short) 1 > (short) 2).isFalse(), + assertThat(1 <= 2).isTrue(), + assertThat(1 > 2).isFalse(), + assertThat(1L <= 2L).isTrue(), + assertThat(1L > 2L).isFalse(), + assertThat(1F <= 2F).isTrue(), + assertThat(1F > 2F).isFalse(), + assertThat(1.0 <= 2.0).isTrue(), + assertThat(1.0 > 2.0).isFalse()); + } + + ImmutableSet> testAssertThatIsGreaterThan() { + return ImmutableSet.of( + assertThat((byte) 1 > (byte) 2).isTrue(), + assertThat((byte) 1 <= (byte) 2).isFalse(), + assertThat((char) 1 > (char) 2).isTrue(), + assertThat((char) 1 <= (char) 2).isFalse(), + assertThat((short) 1 > (short) 2).isTrue(), + assertThat((short) 1 <= (short) 2).isFalse(), + assertThat(1 > 2).isTrue(), + assertThat(1 <= 2).isFalse(), + assertThat(1L > 2L).isTrue(), + assertThat(1L <= 2L).isFalse(), + assertThat(1F > 2F).isTrue(), + assertThat(1F <= 2F).isFalse(), + assertThat(1.0 > 2.0).isTrue(), + assertThat(1.0 <= 2.0).isFalse()); + } + + ImmutableSet> testAssertThatIsGreaterThanOrEqualTo() { + return ImmutableSet.of( + assertThat((byte) 1 >= (byte) 2).isTrue(), + assertThat((byte) 1 < (byte) 2).isFalse(), + assertThat((char) 1 >= (char) 2).isTrue(), + assertThat((char) 1 < (char) 2).isFalse(), + assertThat((short) 1 >= (short) 2).isTrue(), + assertThat((short) 1 < (short) 2).isFalse(), + assertThat(1 >= 2).isTrue(), + assertThat(1 < 2).isFalse(), + assertThat(1L >= 2L).isTrue(), + assertThat(1L < 2L).isFalse(), + assertThat(1F >= 2F).isTrue(), + assertThat(1F < 2F).isFalse(), + assertThat(1.0 >= 2.0).isTrue(), + assertThat(1.0 < 2.0).isFalse()); + } +} diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJPrimitiveTemplatesTestOutput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJPrimitiveTemplatesTestOutput.java new file mode 100644 index 0000000000..7215bbfb8c --- /dev/null +++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refastertemplates/AssertJPrimitiveTemplatesTestOutput.java @@ -0,0 +1,123 @@ +package tech.picnic.errorprone.refastertemplates; + +import static org.assertj.core.api.Assertions.assertThat; + +import com.google.common.collect.ImmutableSet; +import org.assertj.core.api.AbstractAssert; +import tech.picnic.errorprone.refaster.test.RefasterTemplateTestCase; + +final class AssertJPrimitiveTemplatesTest implements RefasterTemplateTestCase { + @SuppressWarnings("SimplifyBooleanExpression") + ImmutableSet> testAssertThatIsEqualTo() { + return ImmutableSet.of( + assertThat(true).isEqualTo(false), + assertThat(true).isEqualTo(false), + assertThat((byte) 1).isEqualTo((byte) 2), + assertThat((byte) 1).isEqualTo((byte) 2), + assertThat((char) 1).isEqualTo((char) 2), + assertThat((char) 1).isEqualTo((char) 2), + assertThat((short) 1).isEqualTo((short) 2), + assertThat((short) 1).isEqualTo((short) 2), + assertThat(1).isEqualTo(2), + assertThat(1).isEqualTo(2), + assertThat(1L).isEqualTo(2L), + assertThat(1L).isEqualTo(2L), + assertThat(1F).isEqualTo(2F), + assertThat(1F).isEqualTo(2F), + assertThat(1.0).isEqualTo(2.0), + assertThat(1.0).isEqualTo(2.0)); + } + + @SuppressWarnings("SimplifyBooleanExpression") + ImmutableSet> testAssertThatIsNotEqualTo() { + return ImmutableSet.of( + assertThat(true).isNotEqualTo(false), + assertThat(true).isNotEqualTo(false), + assertThat((byte) 1).isNotEqualTo((byte) 2), + assertThat((byte) 1).isNotEqualTo((byte) 2), + assertThat((char) 1).isNotEqualTo((char) 2), + assertThat((char) 1).isNotEqualTo((char) 2), + assertThat((short) 1).isNotEqualTo((short) 2), + assertThat((short) 1).isNotEqualTo((short) 2), + assertThat(1).isNotEqualTo(2), + assertThat(1).isNotEqualTo(2), + assertThat(1L).isNotEqualTo(2L), + assertThat(1L).isNotEqualTo(2L), + assertThat(1F).isNotEqualTo(2F), + assertThat(1F).isNotEqualTo(2F), + assertThat(1.0).isNotEqualTo(2.0), + assertThat(1.0).isNotEqualTo(2.0)); + } + + ImmutableSet> testAssertThatIsLessThan() { + return ImmutableSet.of( + assertThat((byte) 1).isLessThan((byte) 2), + assertThat((byte) 1).isLessThan((byte) 2), + assertThat((char) 1).isLessThan((char) 2), + assertThat((char) 1).isLessThan((char) 2), + assertThat((short) 1).isLessThan((short) 2), + assertThat((short) 1).isLessThan((short) 2), + assertThat(1).isLessThan(2), + assertThat(1).isLessThan(2), + assertThat(1L).isLessThan(2L), + assertThat(1L).isLessThan(2L), + assertThat(1F).isLessThan(2F), + assertThat(1F).isLessThan(2F), + assertThat(1.0).isLessThan(2.0), + assertThat(1.0).isLessThan(2.0)); + } + + ImmutableSet> testAssertThatIsLessThanOrEqualTo() { + return ImmutableSet.of( + assertThat((byte) 1).isLessThanOrEqualTo((byte) 2), + assertThat((byte) 1).isLessThanOrEqualTo((byte) 2), + assertThat((char) 1).isLessThanOrEqualTo((char) 2), + assertThat((char) 1).isLessThanOrEqualTo((char) 2), + assertThat((short) 1).isLessThanOrEqualTo((short) 2), + assertThat((short) 1).isLessThanOrEqualTo((short) 2), + assertThat(1).isLessThanOrEqualTo(2), + assertThat(1).isLessThanOrEqualTo(2), + assertThat(1L).isLessThanOrEqualTo(2L), + assertThat(1L).isLessThanOrEqualTo(2L), + assertThat(1F).isLessThanOrEqualTo(2F), + assertThat(1F).isLessThanOrEqualTo(2F), + assertThat(1.0).isLessThanOrEqualTo(2.0), + assertThat(1.0).isLessThanOrEqualTo(2.0)); + } + + ImmutableSet> testAssertThatIsGreaterThan() { + return ImmutableSet.of( + assertThat((byte) 1).isGreaterThan((byte) 2), + assertThat((byte) 1).isGreaterThan((byte) 2), + assertThat((char) 1).isGreaterThan((char) 2), + assertThat((char) 1).isGreaterThan((char) 2), + assertThat((short) 1).isGreaterThan((short) 2), + assertThat((short) 1).isGreaterThan((short) 2), + assertThat(1).isGreaterThan(2), + assertThat(1).isGreaterThan(2), + assertThat(1L).isGreaterThan(2L), + assertThat(1L).isGreaterThan(2L), + assertThat(1F).isGreaterThan(2F), + assertThat(1F).isGreaterThan(2F), + assertThat(1.0).isGreaterThan(2.0), + assertThat(1.0).isGreaterThan(2.0)); + } + + ImmutableSet> testAssertThatIsGreaterThanOrEqualTo() { + return ImmutableSet.of( + assertThat((byte) 1).isGreaterThanOrEqualTo((byte) 2), + assertThat((byte) 1).isGreaterThanOrEqualTo((byte) 2), + assertThat((char) 1).isGreaterThanOrEqualTo((char) 2), + assertThat((char) 1).isGreaterThanOrEqualTo((char) 2), + assertThat((short) 1).isGreaterThanOrEqualTo((short) 2), + assertThat((short) 1).isGreaterThanOrEqualTo((short) 2), + assertThat(1).isGreaterThanOrEqualTo(2), + assertThat(1).isGreaterThanOrEqualTo(2), + assertThat(1L).isGreaterThanOrEqualTo(2L), + assertThat(1L).isGreaterThanOrEqualTo(2L), + assertThat(1F).isGreaterThanOrEqualTo(2F), + assertThat(1F).isGreaterThanOrEqualTo(2F), + assertThat(1.0).isGreaterThanOrEqualTo(2.0), + assertThat(1.0).isGreaterThanOrEqualTo(2.0)); + } +}