Home / Function/ testDuplicateOfDuplicate() — netty Function Reference

testDuplicateOfDuplicate() — netty Function Reference

Architecture documentation for the testDuplicateOfDuplicate() function in ByteBufDerivationTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  e7af72b3_0486_23ee_c8d7_ffa63a7d4169["testDuplicateOfDuplicate()"]
  fd4020ab_f8d0_a065_dc31_0331d0318aa5["ByteBufDerivationTest"]
  e7af72b3_0486_23ee_c8d7_ffa63a7d4169 -->|defined in| fd4020ab_f8d0_a065_dc31_0331d0318aa5
  style e7af72b3_0486_23ee_c8d7_ffa63a7d4169 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

buffer/src/test/java/io/netty/buffer/ByteBufDerivationTest.java lines 82–95

    @Test
    public void testDuplicateOfDuplicate() throws Exception {
        ByteBuf buf = Unpooled.buffer(8).setIndex(1, 7);
        ByteBuf dup = buf.duplicate().setIndex(2, 6);
        ByteBuf dup2 = dup.duplicate();

        assertNotSame(dup, dup2);
        assertInstanceOf(DuplicatedByteBuf.class, dup2);
        assertSame(buf, dup2.unwrap());
        assertEquals(dup.readerIndex(), dup2.readerIndex());
        assertEquals(dup.writerIndex(), dup2.writerIndex());
        assertEquals(dup.capacity(), dup2.capacity());
        assertEquals(dup.maxCapacity(), dup2.maxCapacity());
    }

Domain

Subdomains

Frequently Asked Questions

What does testDuplicateOfDuplicate() do?
testDuplicateOfDuplicate() is a function in the netty codebase, defined in buffer/src/test/java/io/netty/buffer/ByteBufDerivationTest.java.
Where is testDuplicateOfDuplicate() defined?
testDuplicateOfDuplicate() is defined in buffer/src/test/java/io/netty/buffer/ByteBufDerivationTest.java at line 82.

Analyze Your Own Codebase

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

Try Supermodel Free