Home / Function/ testRegularDecode() — netty Function Reference

testRegularDecode() — netty Function Reference

Architecture documentation for the testRegularDecode() function in ProtobufVarint32FrameDecoderTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  875e611e_920a_ab3f_4981_07cad11f9592["testRegularDecode()"]
  89708b8b_0bd5_7657_39f7_5e017cf8f339["ProtobufVarint32FrameDecoderTest"]
  875e611e_920a_ab3f_4981_07cad11f9592 -->|defined in| 89708b8b_0bd5_7657_39f7_5e017cf8f339
  style 875e611e_920a_ab3f_4981_07cad11f9592 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-protobuf/src/test/java/io/netty/handler/codec/protobuf/ProtobufVarint32FrameDecoderTest.java lines 58–81

    @Test
    public void testRegularDecode() {
        byte[] b = new byte[2048];
        for (int i = 2; i < 2048; i ++) {
            b[i] = 1;
        }
        b[0] = -2;
        b[1] = 15;
        assertFalse(ch.writeInbound(wrappedBuffer(b, 0, 1)));
        assertNull(ch.readInbound());
        assertFalse(ch.writeInbound(wrappedBuffer(b, 1, 127)));
        assertNull(ch.readInbound());
        assertFalse(ch.writeInbound(wrappedBuffer(b, 127, 600)));
        assertNull(ch.readInbound());
        assertTrue(ch.writeInbound(wrappedBuffer(b, 727, b.length - 727)));

        ByteBuf expected = wrappedBuffer(b, 2, b.length - 2);
        ByteBuf actual = ch.readInbound();
        assertEquals(expected, actual);
        assertFalse(ch.finish());

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

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free