Package com.google.protobuf.micro.MicroOuterClass

Examples of com.google.protobuf.micro.MicroOuterClass.TestAllTypesMicro.clear()


    msg.clearOptionalFixed64();
    assertFalse(msg.hasOptionalFixed64());
    msg.clearOptionalFixed64()
       .setOptionalFixed64(456);
    assertTrue(msg.hasOptionalFixed64());
    msg.clear();
    assertFalse(msg.hasOptionalFixed64());

    msg.setOptionalFixed64(123);
    byte [] result = msg.toByteArray();
    int msgSerializedSize = msg.getSerializedSize();
View Full Code Here


    msg.clearOptionalSfixed32();
    assertFalse(msg.hasOptionalSfixed32());
    msg.clearOptionalSfixed32()
       .setOptionalSfixed32(456);
    assertTrue(msg.hasOptionalSfixed32());
    msg.clear();
    assertFalse(msg.hasOptionalSfixed32());

    msg.setOptionalSfixed32(123);
    byte [] result = msg.toByteArray();
    int msgSerializedSize = msg.getSerializedSize();
View Full Code Here

    msg.clearOptionalSfixed64();
    assertFalse(msg.hasOptionalSfixed64());
    msg.clearOptionalSfixed64()
       .setOptionalSfixed64(456);
    assertTrue(msg.hasOptionalSfixed64());
    msg.clear();
    assertFalse(msg.hasOptionalSfixed64());

    msg.setOptionalSfixed64(-123);
    byte [] result = msg.toByteArray();
    int msgSerializedSize = msg.getSerializedSize();
View Full Code Here

    msg.clearOptionalFloat();
    assertFalse(msg.hasOptionalFloat());
    msg.clearOptionalFloat()
       .setOptionalFloat(456.0f);
    assertTrue(msg.hasOptionalFloat());
    msg.clear();
    assertFalse(msg.hasOptionalFloat());

    msg.setOptionalFloat(-123.456f);
    byte [] result = msg.toByteArray();
    int msgSerializedSize = msg.getSerializedSize();
View Full Code Here

    msg.clearOptionalDouble();
    assertFalse(msg.hasOptionalDouble());
    msg.clearOptionalDouble()
       .setOptionalDouble(456.0);
    assertTrue(msg.hasOptionalDouble());
    msg.clear();
    assertFalse(msg.hasOptionalDouble());

    msg.setOptionalDouble(-123.456);
    byte [] result = msg.toByteArray();
    int msgSerializedSize = msg.getSerializedSize();
View Full Code Here

    msg.clearOptionalBool();
    assertFalse(msg.hasOptionalBool());
    msg.clearOptionalBool()
       .setOptionalBool(true);
    assertTrue(msg.hasOptionalBool());
    msg.clear();
    assertFalse(msg.hasOptionalBool());

    msg.setOptionalBool(false);
    byte [] result = msg.toByteArray();
    int msgSerializedSize = msg.getSerializedSize();
View Full Code Here

    msg.clearOptionalString();
    assertFalse(msg.hasOptionalString());
    msg.clearOptionalString()
       .setOptionalString("hello");
    assertTrue(msg.hasOptionalString());
    msg.clear();
    assertFalse(msg.hasOptionalString());

    msg.setOptionalString("bye");
    byte [] result = msg.toByteArray();
    int msgSerializedSize = msg.getSerializedSize();
View Full Code Here

    msg.clearOptionalBytes();
    assertFalse(msg.hasOptionalBytes());
    msg.clearOptionalBytes()
       .setOptionalBytes(ByteStringMicro.copyFromUtf8("hello"));
    assertTrue(msg.hasOptionalBytes());
    msg.clear();
    assertFalse(msg.hasOptionalBytes());

    msg.setOptionalBytes(ByteStringMicro.copyFromUtf8("bye"));
    byte [] result = msg.toByteArray();
    int msgSerializedSize = msg.getSerializedSize();
View Full Code Here

    msg.clearOptionalGroup();
    assertFalse(msg.hasOptionalGroup());
    msg.clearOptionalGroup()
       .setOptionalGroup(new TestAllTypesMicro.OptionalGroup().setA(2));
    assertTrue(msg.hasOptionalGroup());
    msg.clear();
    assertFalse(msg.hasOptionalGroup());

    msg.setOptionalGroup(grp);
    byte [] result = msg.toByteArray();
    int msgSerializedSize = msg.getSerializedSize();
View Full Code Here

    msg.clearOptionalNestedMessage();
    assertFalse(msg.hasOptionalNestedMessage());
    msg.clearOptionalNestedMessage()
       .setOptionalNestedMessage(new TestAllTypesMicro.NestedMessage().setBb(2));
    assertTrue(msg.hasOptionalNestedMessage());
    msg.clear();
    assertFalse(msg.hasOptionalNestedMessage());

    msg.setOptionalNestedMessage(nestedMsg);
    byte [] result = msg.toByteArray();
    int msgSerializedSize = msg.getSerializedSize();
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.