add tests to Arrays.java and Longs.java

This commit is contained in:
Joel Dice 2009-02-02 19:12:07 -07:00
parent 123e22322c
commit 6297c8a906
2 changed files with 6 additions and 0 deletions

View File

@ -31,6 +31,11 @@ public class Arrays {
expect(array[0].length == 1); expect(array[0].length == 1);
} }
{ Object[][] array = new Object[2][3];
expect(array.length == 2);
expect(array[0].length == 3);
}
{ int j = 0; { int j = 0;
byte[] decodeTable = new byte[256]; byte[] decodeTable = new byte[256];
for (int i = 'A'; i <= 'Z'; ++i) decodeTable[i] = (byte) j++; for (int i = 'A'; i <= 'Z'; ++i) decodeTable[i] = (byte) j++;

View File

@ -30,6 +30,7 @@ public class Longs {
} }
expect(roundUp(156, 2) == 156); expect(roundUp(156, 2) == 156);
expect(((int) roundUp(156, 2)) == 156);
expect(Long.parseLong("25214903884") == 25214903884L); expect(Long.parseLong("25214903884") == 25214903884L);