| 58 | } |
| 59 | |
| 60 | void checkVarintConformance(ByteBuffer& buffer) { |
| 61 | // Check that the behavior of our field behaves constantly |
| 62 | // with Protobuf WireFormat |
| 63 | checkValue<WireFormat::TYPE_INT32>(buffer, field.getInt32()); |
| 64 | checkValue<WireFormat::TYPE_INT64>(buffer, field.getInt64()); |
| 65 | checkValue<WireFormat::TYPE_UINT32>(buffer, field.getUInt32()); |
| 66 | checkValue<WireFormat::TYPE_UINT64>(buffer, field.getUInt64()); |
| 67 | checkValue<WireFormat::TYPE_SINT32>(buffer, field.getSInt32()); |
| 68 | checkValue<WireFormat::TYPE_SINT64>(buffer, field.getSInt64()); |
| 69 | checkValue<WireFormat::TYPE_BOOL>(buffer, field.getBool()); |
| 70 | checkValue<WireFormat::TYPE_ENUM>(buffer, static_cast<int>(field.getEnum())); |
| 71 | } |
| 72 | |
| 73 | void checkFixed64Conformance(ByteBuffer& buffer) { |
| 74 | checkValue<WireFormat::TYPE_FIXED64>(buffer, field.getFixed64()); |