public void testRawVarInt64Bytes() throws Exception
    {
        String n1 = "long1", n2 = "long2";
        for (int i = 0; i < int64values.length;)
        {
            long[] inner = int64values[i++];
            int num = i;
            for (int j = 0; j < inner.length; j++)
            {
                long value = inner[j];
                int valueSize = CodedOutput.computeRawVarint64Size(value);
                int tag = WireFormat.makeTag(num, FieldType.INT64.wireType);
                int tagSize = CodedOutput.computeRawVarint32Size(tag);
                int expect = tagSize + valueSize;

                assertSize(n1, CodedOutput.computeInt64Size(num, value), expect);
                assertSize(n2, CodedOutput.getTagAndRawVarInt64Bytes(tag, value).length, expect);
            }
        }
    }
CodedOutput test for the size of the bytes written.

@author David Yu
@created Nov 11, 2009
protostuff-core/src/test/java/io/protostuff/CodedOutputTest.java