Commits

Tobias Westerblom  committed 9221ff0

added more numbers to test

  • Participants
  • Parent commits 8a749bb

Comments (0)

Files changed (1)

File core/src/test/java/com/cubeia/firebase/protocol/StyxTest.java

         ByteArrayOutputStream os = new ByteArrayOutputStream();
         DataOutputStream dos = new DataOutputStream(os);
         PacketOutputStream pos = new PacketOutputStream(dos);
-        long unsignedIntValue = 1234L;
-        pos.saveUnsignedInt(unsignedIntValue);
+        long value1 = 1234L;
+        long value2 = 0xffffffff;
+        long value3 = 0xff00ff00;
+        pos.saveUnsignedInt(value1);
+        pos.saveUnsignedInt(value2);
+        pos.saveUnsignedInt(value3);
 
         byte[] byteBuffer = os.toByteArray();
         InputStream is = new ByteArrayInputStream(byteBuffer);
         dis.read(ba);
         PacketInputStream pis = new PacketInputStream(ByteBuffer.wrap(ba));
         
-        long unsignedIntResult = pis.loadUnsignedInt();
-        assertThat(unsignedIntResult, is(unsignedIntValue));
+        long result1 = pis.loadUnsignedInt();
+        long result2 = pis.loadUnsignedInt();
+        long result3 = pis.loadUnsignedInt();
+        assertThat(result1, is(value1));
+        assertThat(result2, is(value2));
+        assertThat(result3, is(value3));
     }    
     
     private String randomString(int length) {