Home / Function/ forEachDescTest() — netty Function Reference

forEachDescTest() — netty Function Reference

Architecture documentation for the forEachDescTest() function in AsciiStringMemoryTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  159c8da0_bc17_5c1a_e6c3_5e5082333e81["forEachDescTest()"]
  cfaf93a3_50a8_27c3_9fa0_2c606fea9e15["AsciiStringMemoryTest"]
  159c8da0_bc17_5c1a_e6c3_5e5082333e81 -->|defined in| cfaf93a3_50a8_27c3_9fa0_2c606fea9e15
  style 159c8da0_bc17_5c1a_e6c3_5e5082333e81 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

common/src/test/java/io/netty/util/AsciiStringMemoryTest.java lines 118–142

    @Test
    public void forEachDescTest() throws Exception {
        final AtomicReference<Integer> aCount = new AtomicReference<Integer>(0);
        final AtomicReference<Integer> bCount = new AtomicReference<Integer>(0);
        aAsciiString.forEachByteDesc(new ByteProcessor() {
            int i = 1;
            @Override
            public boolean process(byte value) {
                assertEquals(value, bAsciiString.byteAt(bAsciiString.length() - (i++)), "failed at index: " + i);
                aCount.set(aCount.get() + 1);
                return true;
            }
        });
        bAsciiString.forEachByteDesc(new ByteProcessor() {
            int i = 1;
            @Override
            public boolean process(byte value) {
                assertEquals(value, aAsciiString.byteAt(aAsciiString.length() - (i++)), "failed at index: " + i);
                bCount.set(bCount.get() + 1);
                return true;
            }
        });
        assertEquals(aAsciiString.length(), aCount.get().intValue());
        assertEquals(bAsciiString.length(), bCount.get().intValue());
    }

Domain

Subdomains

Frequently Asked Questions

What does forEachDescTest() do?
forEachDescTest() is a function in the netty codebase, defined in common/src/test/java/io/netty/util/AsciiStringMemoryTest.java.
Where is forEachDescTest() defined?
forEachDescTest() is defined in common/src/test/java/io/netty/util/AsciiStringMemoryTest.java at line 118.

Analyze Your Own Codebase

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

Try Supermodel Free