public void testRawLittleEndian64Bytes() throws Exception { String n1 = "double1", n2 = "double2"; for (int i = 0; i < doubleValues.length; ) { double[] inner = doubleValues[i++]; int num = i; for (int j = 0; j < inner.length; j++) { long value = Double.doubleToRawLongBits(inner[j]); int tag = WireFormat.makeTag(num, FieldType.DOUBLE.wireType); int tagSize = CodedOutput.computeRawVarint32Size(tag); int expect = tagSize + CodedOutput.LITTLE_ENDIAN_64_SIZE; assertSize(n1, CodedOutput.computeDoubleSize(num, inner[j]), expect); assertSize(n2, CodedOutput.getTagAndRawLittleEndian64Bytes(tag, value).length, expect); } } }