mirror of
https://github.com/revanced/smali.git
synced 2025-05-05 00:54:25 +02:00
Add tests for a negitave hex numbers with an alpha (a-f) digit
git-svn-id: https://smali.googlecode.com/svn/trunk@741 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
This commit is contained in:
parent
4ccbb4e8bd
commit
be6afd1812
@ -48,6 +48,7 @@ public class ByteLiteralTest
|
||||
Assert.assertTrue(literalTools.parseByte("-0x01") == -1);
|
||||
Assert.assertTrue(literalTools.parseByte("-0x12") == -0x12);
|
||||
Assert.assertTrue(literalTools.parseByte("-0x80") == Byte.MIN_VALUE);
|
||||
Assert.assertTrue(literalTools.parseByte("-0x1f") == -0x1f);
|
||||
}
|
||||
|
||||
@Test(expected=NumberFormatException.class)
|
||||
|
@ -32,7 +32,6 @@ import org.junit.Test;
|
||||
|
||||
public class IntLiteralTest
|
||||
{
|
||||
|
||||
@Test
|
||||
public void SuccessHexTests() {
|
||||
|
||||
@ -48,6 +47,7 @@ public class IntLiteralTest
|
||||
Assert.assertTrue(literalTools.parseInt("-0x01") == -1);
|
||||
Assert.assertTrue(literalTools.parseInt("-0x12345678") == -0x12345678);
|
||||
Assert.assertTrue(literalTools.parseInt("-0x80000000") == Integer.MIN_VALUE);
|
||||
Assert.assertTrue(literalTools.parseInt("-0x1FFFFFFF") == -0x1FFFFFFF);
|
||||
}
|
||||
|
||||
@Test(expected=NumberFormatException.class)
|
||||
|
@ -46,6 +46,7 @@ public class LongLiteralTest
|
||||
Assert.assertTrue(literalTools.parseLong("-0x01L") == -1);
|
||||
Assert.assertTrue(literalTools.parseLong("-0x1234567890123456L") == -0x1234567890123456L);
|
||||
Assert.assertTrue(literalTools.parseLong("-0x8000000000000000") == Long.MIN_VALUE);
|
||||
Assert.assertTrue(literalTools.parseLong("-0x1fffffffffffffffL") == -0x1fffffffffffffffL);
|
||||
}
|
||||
|
||||
@Test(expected=NumberFormatException.class)
|
||||
|
@ -48,6 +48,7 @@ public class ShortLiteralTest
|
||||
Assert.assertTrue(literalTools.parseShort("-0x01") == -1);
|
||||
Assert.assertTrue(literalTools.parseShort("-0x1234") == -0x1234);
|
||||
Assert.assertTrue(literalTools.parseShort("-0x8000") == Short.MIN_VALUE);
|
||||
Assert.assertTrue(literalTools.parseShort("-0x1fff") == -0x1fff);
|
||||
}
|
||||
|
||||
@Test(expected=NumberFormatException.class)
|
||||
@ -104,7 +105,7 @@ public class ShortLiteralTest
|
||||
literalTools.parseShort("65600");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Test
|
||||
public void SuccessOctTests() {
|
||||
Assert.assertTrue(literalTools.parseShort("00") == 00);
|
||||
|
Loading…
x
Reference in New Issue
Block a user