Package protobuf_unittest.UnittestProto

Examples of protobuf_unittest.UnittestProto.Int64Message.toByteString()


  }

  public void testCompatibleTypes() throws Exception {
    long data = 0x100000000L;
    Int64Message message = Int64Message.newBuilder().setData(data).build();
    ByteString serialized = message.toByteString();

    // Test int64(long) is compatible with bool(boolean)
    BoolMessage msg2 = BoolMessage.parseFrom(serialized);
    assertTrue(msg2.getData());
View Full Code Here


  }

  public void testCompatibleTypes() throws Exception {
    long data = 0x100000000L;
    Int64Message message = Int64Message.newBuilder().setData(data).build();
    ByteString serialized = message.toByteString();

    // Test int64(long) is compatible with bool(boolean)
    BoolMessage msg2 = BoolMessage.parseFrom(serialized);
    assertTrue(msg2.getData());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.