forEachTest() — netty Function Reference
Architecture documentation for the forEachTest() function in AsciiStringMemoryTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 499234af_8b4a_a091_9568_23f241f88891["forEachTest()"] cfaf93a3_50a8_27c3_9fa0_2c606fea9e15["AsciiStringMemoryTest"] 499234af_8b4a_a091_9568_23f241f88891 -->|defined in| cfaf93a3_50a8_27c3_9fa0_2c606fea9e15 style 499234af_8b4a_a091_9568_23f241f88891 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
common/src/test/java/io/netty/util/AsciiStringMemoryTest.java lines 80–104
@Test
public void forEachTest() throws Exception {
final AtomicReference<Integer> aCount = new AtomicReference<Integer>(0);
final AtomicReference<Integer> bCount = new AtomicReference<Integer>(0);
aAsciiString.forEachByte(new ByteProcessor() {
int i;
@Override
public boolean process(byte value) {
assertEquals(value, bAsciiString.byteAt(i++), "failed at index: " + i);
aCount.set(aCount.get() + 1);
return true;
}
});
bAsciiString.forEachByte(new ByteProcessor() {
int i;
@Override
public boolean process(byte value) {
assertEquals(value, aAsciiString.byteAt(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
Source
Frequently Asked Questions
What does forEachTest() do?
forEachTest() is a function in the netty codebase, defined in common/src/test/java/io/netty/util/AsciiStringMemoryTest.java.
Where is forEachTest() defined?
forEachTest() is defined in common/src/test/java/io/netty/util/AsciiStringMemoryTest.java at line 80.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free