diff -r b42bfe334128 -r eecf6077ec4e vm/src/test/java/org/apidesign/vm4brwsr/Numbers.java --- a/vm/src/test/java/org/apidesign/vm4brwsr/Numbers.java Mon Feb 04 09:41:33 2013 +0100 +++ b/vm/src/test/java/org/apidesign/vm4brwsr/Numbers.java Tue Feb 05 16:40:01 2013 +0100 @@ -102,12 +102,20 @@ return (disX.readLong() * disY.readLong()); } - public static long divL(long x, long y) { - return (x / y); + public static long divL(byte[] arrX, byte[] arrY) throws IOException { + ByteArrayInputStream isX = new ByteArrayInputStream(arrX); + DataInputStream disX = new DataInputStream(isX); + ByteArrayInputStream isY = new ByteArrayInputStream(arrY); + DataInputStream disY = new DataInputStream(isY); + return (disX.readLong() / disY.readLong()); } - public static long modL(long x, long y) { - return (x % y); + public static long modL(byte[] arrX, byte[] arrY) throws IOException { + ByteArrayInputStream isX = new ByteArrayInputStream(arrX); + DataInputStream disX = new DataInputStream(isX); + ByteArrayInputStream isY = new ByteArrayInputStream(arrY); + DataInputStream disY = new DataInputStream(isY); + return (disX.readLong() % disY.readLong()); } public static long shlL(byte[] arrValue, int nBits) throws IOException {