Home / Function/ testDuplicateOfRetainedSliceHasTheSameCapacityAsTheSlice() — netty Function Reference

testDuplicateOfRetainedSliceHasTheSameCapacityAsTheSlice() — netty Function Reference

Architecture documentation for the testDuplicateOfRetainedSliceHasTheSameCapacityAsTheSlice() function in AbstractByteBufTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  0b97911b_7546_33fe_eff8_2f10d38c22b4["testDuplicateOfRetainedSliceHasTheSameCapacityAsTheSlice()"]
  6540f2d1_cdad_6705_dd1d_9a24e2e53242["AbstractByteBufTest"]
  0b97911b_7546_33fe_eff8_2f10d38c22b4 -->|defined in| 6540f2d1_cdad_6705_dd1d_9a24e2e53242
  style 0b97911b_7546_33fe_eff8_2f10d38c22b4 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

buffer/src/test/java/io/netty/buffer/AbstractByteBufTest.java lines 2172–2195

    @Test
    public void testDuplicateOfRetainedSliceHasTheSameCapacityAsTheSlice() {
        ByteBuf slice = buffer.retainedSlice();
        ByteBuf duplicate = slice.duplicate();
        assertEquals(slice.capacity(), duplicate.capacity());
        slice.release();

        slice = buffer.retainedSlice(0, buffer.capacity() - 2);
        duplicate = slice.duplicate();
        assertEquals(slice.capacity(), duplicate.capacity());
        slice.release();

        slice = buffer.retainedSlice();
        duplicate = slice.retainedDuplicate();
        assertEquals(slice.capacity(), duplicate.capacity());
        slice.release();
        duplicate.release();

        slice = buffer.retainedSlice(0, buffer.capacity() - 2);
        duplicate = slice.retainedDuplicate();
        assertEquals(slice.capacity(), duplicate.capacity());
        slice.release();
        duplicate.release();
    }

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free