示例#1
0
        private void internalTestLong(long v)
        {
            // Serialize/deserialize here
            BBufferBin bbuf = (BBufferBin)BBuffer.create(BBinaryModel.MEDIUM, null);

            bbuf.putLong(v);
            byte[]     data  = bbuf.getBuffer().array();
            BBufferBin bbuf2 = (BBufferBin)BBuffer.create(BBinaryModel.MEDIUM, ByteBuffer.wrap(data, 0, bbuf.position()));
            long       r     = bbuf2.getLong();

            TestUtils.assertEquals(log, "longVal", v, r);

            // Send to server, receive from server
            remote.SetLong(v);
            r = remote.GetLong();
            TestUtils.assertEquals(log, "Wrong long", v, r);
        }