testSearchForMultiple() — netty Function Reference
Architecture documentation for the testSearchForMultiple() function in MultiSearchProcessorTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD d97b0206_22d8_e3a9_f1a7_1303fbc74f3c["testSearchForMultiple()"] a8e37b86_7953_7ee3_77cd_bf0850236222["MultiSearchProcessorTest"] d97b0206_22d8_e3a9_f1a7_1303fbc74f3c -->|defined in| a8e37b86_7953_7ee3_77cd_bf0850236222 116a4472_a951_e809_485f_110d4e496074["bytes()"] d97b0206_22d8_e3a9_f1a7_1303fbc74f3c -->|calls| 116a4472_a951_e809_485f_110d4e496074 style d97b0206_22d8_e3a9_f1a7_1303fbc74f3c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
buffer/src/test/java/io/netty/buffer/search/MultiSearchProcessorTest.java lines 27–55
@Test
public void testSearchForMultiple() {
final ByteBuf haystack = Unpooled.copiedBuffer("one two three one", CharsetUtil.UTF_8);
final int length = haystack.readableBytes();
final MultiSearchProcessor processor = AbstractMultiSearchProcessorFactory.newAhoCorasicSearchProcessorFactory(
bytes("one"),
bytes("two"),
bytes("three")
).newSearchProcessor();
assertEquals(-1, processor.getFoundNeedleId());
assertEquals(2, haystack.forEachByte(processor));
assertEquals(0, processor.getFoundNeedleId()); // index of "one" in needles[]
assertEquals(6, haystack.forEachByte(3, length - 3, processor));
assertEquals(1, processor.getFoundNeedleId()); // index of "two" in needles[]
assertEquals(12, haystack.forEachByte(7, length - 7, processor));
assertEquals(2, processor.getFoundNeedleId()); // index of "three" in needles[]
assertEquals(16, haystack.forEachByte(13, length - 13, processor));
assertEquals(0, processor.getFoundNeedleId()); // index of "one" in needles[]
assertEquals(-1, haystack.forEachByte(17, length - 17, processor));
haystack.release();
}
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does testSearchForMultiple() do?
testSearchForMultiple() is a function in the netty codebase, defined in buffer/src/test/java/io/netty/buffer/search/MultiSearchProcessorTest.java.
Where is testSearchForMultiple() defined?
testSearchForMultiple() is defined in buffer/src/test/java/io/netty/buffer/search/MultiSearchProcessorTest.java at line 27.
What does testSearchForMultiple() call?
testSearchForMultiple() calls 1 function(s): bytes.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free