public void testRawLittleEndian32Bytes() throws Exception { String n1 = "float1", n2 = "float2"; for (int i = 0; i < floatValues.length; ) { float[] inner = floatValues[i++]; int num = i; for (int j = 0; j < inner.length; j++) { int value = Float.floatToRawIntBits(inner[j]); int valueSize = CodedOutput.LITTLE_ENDIAN_32_SIZE; int tag = WireFormat.makeTag(num, FieldType.FLOAT.wireType); int tagSize = CodedOutput.computeRawVarint32Size(tag); int expect = tagSize + valueSize; assertSize(n1, CodedOutput.computeFloatSize(num, inner[j]), expect); assertSize(n2, CodedOutput.getTagAndRawLittleEndian32Bytes(tag, value).length, expect); } } }