Home / Function/ testSize1Varint() — netty Function Reference

testSize1Varint() — netty Function Reference

Architecture documentation for the testSize1Varint() function in ProtobufVarint32LengthFieldPrependerTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  4ef7e0a1_6114_5224_696d_eb58bcc532a2["testSize1Varint()"]
  6eaee290_afed_8a50_d035_25ef3cea2e1f["ProtobufVarint32LengthFieldPrependerTest"]
  4ef7e0a1_6114_5224_696d_eb58bcc532a2 -->|defined in| 6eaee290_afed_8a50_d035_25ef3cea2e1f
  style 4ef7e0a1_6114_5224_696d_eb58bcc532a2 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-protobuf/src/test/java/io/netty/handler/codec/protobuf/ProtobufVarint32LengthFieldPrependerTest.java lines 37–58

    @Test
    public void testSize1Varint() {
        final int size = 1;
        final int num = 10;
        assertEquals(size, ProtobufVarint32LengthFieldPrepender.computeRawVarint32Size(num));
        final byte[] buf = new byte[size + num];
        //0000 1010
        buf[0] = 0x0A;
        for (int i = size; i < num + size; ++i) {
            buf[i] = 1;
        }
        assertTrue(ch.writeOutbound(wrappedBuffer(buf, size, buf.length - size)));

        ByteBuf expected = wrappedBuffer(buf);
        ByteBuf actual = ch.readOutbound();

        assertEquals(expected, actual);
        assertFalse(ch.finish());

        expected.release();
        actual.release();
    }

Domain

Subdomains

Frequently Asked Questions

What does testSize1Varint() do?
testSize1Varint() is a function in the netty codebase, defined in codec-protobuf/src/test/java/io/netty/handler/codec/protobuf/ProtobufVarint32LengthFieldPrependerTest.java.
Where is testSize1Varint() defined?
testSize1Varint() is defined in codec-protobuf/src/test/java/io/netty/handler/codec/protobuf/ProtobufVarint32LengthFieldPrependerTest.java at line 37.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free