rt/vm/src/test/java/org/apidesign/vm4brwsr/Numbers.java
branchclosure
changeset 1558 0c5a8b83182a
parent 1513 ba912ef24b27
child 1595 19d0484c1916
     1.1 --- a/rt/vm/src/test/java/org/apidesign/vm4brwsr/Numbers.java	Wed Apr 30 15:04:10 2014 +0200
     1.2 +++ b/rt/vm/src/test/java/org/apidesign/vm4brwsr/Numbers.java	Sun May 11 23:06:45 2014 +0200
     1.3 @@ -37,46 +37,46 @@
     1.4          return a % b;
     1.5      }
     1.6  
     1.7 -    static float deserFloat() throws IOException {
     1.8 +    public static float deserFloat() throws IOException {
     1.9          byte[] arr = {(byte) 71, (byte) 84, (byte) 52, (byte) 83};
    1.10          ByteArrayInputStream is = new ByteArrayInputStream(arr);
    1.11          DataInputStream dis = new DataInputStream(is);
    1.12          float r = dis.readFloat();
    1.13          return r;
    1.14      }
    1.15 -    static double deserDouble() throws IOException {
    1.16 +    public static double deserDouble() throws IOException {
    1.17          byte[] arr = {(byte)64, (byte)8, (byte)0, (byte)0, (byte)0, (byte)0, (byte)0, (byte)0};
    1.18          ByteArrayInputStream is = new ByteArrayInputStream(arr);
    1.19          DataInputStream dis = new DataInputStream(is);
    1.20          return dis.readDouble();
    1.21      }
    1.22 -    static long deserLong(byte[] arr) throws IOException {
    1.23 +    public static long deserLong(byte[] arr) throws IOException {
    1.24          ByteArrayInputStream is = new ByteArrayInputStream(arr);
    1.25          DataInputStream dis = new DataInputStream(is);
    1.26          return dis.readLong();
    1.27      }
    1.28 -    static long deserLong(byte[] arr, int shift) throws IOException {
    1.29 +    public static long deserLong(byte[] arr, int shift) throws IOException {
    1.30          return deserLong(arr) >> shift;
    1.31      }
    1.32 -    static int deserInt() throws IOException {
    1.33 +    public static int deserInt() throws IOException {
    1.34          byte[] arr = {(byte) 71, (byte) 84, (byte) 52, (byte) 83};
    1.35          ByteArrayInputStream is = new ByteArrayInputStream(arr);
    1.36          DataInputStream dis = new DataInputStream(is);
    1.37          return dis.readInt();
    1.38      }
    1.39 -    static long bytesToLong(byte b1, byte b2, int shift) {
    1.40 +    public static long bytesToLong(byte b1, byte b2, int shift) {
    1.41          return (((long)b1 << 56) +
    1.42                  ((long)b2 & 255) << 48) >> shift;
    1.43      }
    1.44  
    1.45 -    static String intToString() {
    1.46 +    public static String intToString() {
    1.47          return new Integer(5).toString().toString();
    1.48      }
    1.49 -    static String floatToString() {
    1.50 +    public static String floatToString() {
    1.51          return new Float(7.0).toString().toString();
    1.52      }
    1.53      
    1.54 -    static double seven(int todo) {
    1.55 +    public static double seven(int todo) {
    1.56          switch (todo) {
    1.57              case 0: return sevenNew().doubleValue();
    1.58              case 1: return sevenNew().intValue();
    1.59 @@ -91,7 +91,7 @@
    1.60              default: throw new IllegalStateException();
    1.61          }
    1.62      }
    1.63 -    static boolean bseven(int todo) {
    1.64 +    public static boolean bseven(int todo) {
    1.65          switch (todo) {
    1.66              case 30: return bvalueOf(Boolean.FALSE);
    1.67              case 31: return bvalueOf(Boolean.TRUE);