- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for testSaturatedCast (0.14 sec)
-
android/guava-tests/test/com/google/common/primitives/UnsignedIntsTest.java
fail("Cast to int should have failed: " + value); } catch (IllegalArgumentException ex) { assertThat(ex).hasMessageThat().contains(String.valueOf(value)); } } public void testSaturatedCast() { for (long value : UNSIGNED_INTS) { assertThat(UnsignedInts.toLong(UnsignedInts.saturatedCast(value))).isEqualTo(value); } assertThat(UnsignedInts.saturatedCast(1L << 32)).isEqualTo(GREATEST);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 02:56:12 UTC 2024 - 12.5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/primitives/UnsignedBytesTest.java
} assertCastFails(256L); assertCastFails(-1L); assertCastFails(Long.MAX_VALUE); assertCastFails(Long.MIN_VALUE); } public void testSaturatedCast() { for (byte value : VALUES) { assertThat(UnsignedBytes.saturatedCast(UnsignedBytes.toInt(value))).isEqualTo(value); } assertThat(UnsignedBytes.saturatedCast(256L)).isEqualTo(GREATEST);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:07:49 UTC 2024 - 13.4K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/primitives/CharsTest.java
} assertCastFails(GREATEST + 1L); assertCastFails(LEAST - 1L); assertCastFails(Long.MAX_VALUE); assertCastFails(Long.MIN_VALUE); } public void testSaturatedCast() { for (char value : VALUES) { assertThat(Chars.saturatedCast((long) value)).isEqualTo(value); } assertThat(Chars.saturatedCast(GREATEST + 1L)).isEqualTo(GREATEST);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 02:56:12 UTC 2024 - 25.6K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/primitives/IntsTest.java
} assertCastFails(GREATEST + 1L); assertCastFails(LEAST - 1L); assertCastFails(Long.MAX_VALUE); assertCastFails(Long.MIN_VALUE); } public void testSaturatedCast() { for (int value : VALUES) { assertThat(Ints.saturatedCast((long) value)).isEqualTo(value); } assertThat(Ints.saturatedCast(GREATEST + 1L)).isEqualTo(GREATEST);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 02:56:12 UTC 2024 - 29.1K bytes - Viewed (0)