Skip to content

Instantly share code, notes, and snippets.

@jeviolle
Last active August 29, 2015 14:08
Show Gist options
  • Save jeviolle/cb2c517a71e4b9ef5472 to your computer and use it in GitHub Desktop.
Save jeviolle/cb2c517a71e4b9ef5472 to your computer and use it in GitHub Desktop.
import org.junit.Test
import static org.junit.Assert.assertEquals
// 31 - 62 exponents should fail due to type mismatch
class FooTest {
@Test void test30() {
assertEquals 1073741824, (2 ** 30)
}
@Test void test31() {
assertEquals 2147483648, (2 ** 31)
}
@Test void test62() {
assertEquals 4611686018427387904, (2 ** 62)
}
@Test void test63() {
assertEquals 9223372036854775808, (2 ** 63)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment