Home / Function/ testMarksInitialized() — netty Function Reference

testMarksInitialized() — netty Function Reference

Architecture documentation for the testMarksInitialized() function in DuplicatedByteBufTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  38d0c772_fc13_d29a_474e_7d76058dab6c["testMarksInitialized()"]
  7f11d67b_5f83_5dc0_3204_8b1aafe2d6fa["DuplicatedByteBufTest"]
  38d0c772_fc13_d29a_474e_7d76058dab6c -->|defined in| 7f11d67b_5f83_5dc0_3204_8b1aafe2d6fa
  style 38d0c772_fc13_d29a_474e_7d76058dab6c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

buffer/src/test/java/io/netty/buffer/DuplicatedByteBufTest.java lines 68–88

    @Test
    public void testMarksInitialized() {
        ByteBuf wrapped = Unpooled.buffer(8);
        try {
            wrapped.writerIndex(6);
            wrapped.readerIndex(1);
            ByteBuf duplicate = new DuplicatedByteBuf(wrapped);

            // Test writer mark
            duplicate.writerIndex(duplicate.writerIndex() + 1);
            duplicate.resetWriterIndex();
            assertEquals(wrapped.writerIndex(), duplicate.writerIndex());

            // Test reader mark
            duplicate.readerIndex(duplicate.readerIndex() + 1);
            duplicate.resetReaderIndex();
            assertEquals(wrapped.readerIndex(), duplicate.readerIndex());
        } finally {
            wrapped.release();
        }
    }

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free