testLongInputs() — netty Function Reference
Architecture documentation for the testLongInputs() function in SearchProcessorTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 3c770d97_9fcf_1b3a_02f4_b68f2fe7c0af["testLongInputs()"] 77fd8c98_90ee_f735_3303_8eafc0856e0c["SearchProcessorTest"] 3c770d97_9fcf_1b3a_02f4_b68f2fe7c0af -->|defined in| 77fd8c98_90ee_f735_3303_8eafc0856e0c style 3c770d97_9fcf_1b3a_02f4_b68f2fe7c0af fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
buffer/src/test/java/io/netty/buffer/search/SearchProcessorTest.java lines 117–139
@ParameterizedTest
@EnumSource(Algorithm.class)
public void testLongInputs(Algorithm algorithm) {
final int haystackLen = 1024;
final int needleLen = 64;
final byte[] haystackBytes = new byte[haystackLen];
haystackBytes[haystackLen - 1] = 1;
final ByteBuf haystack = Unpooled.copiedBuffer(haystackBytes); // 00000...00001
final byte[] needleBytes = new byte[needleLen]; // 000...000
assertEquals(needleLen - 1, haystack.forEachByte(factory(algorithm, needleBytes).newSearchProcessor()));
needleBytes[needleLen - 1] = 1; // 000...001
assertEquals(haystackLen - 1, haystack.forEachByte(factory(algorithm, needleBytes).newSearchProcessor()));
needleBytes[needleLen - 1] = 2; // 000...002
assertEquals(-1, haystack.forEachByte(factory(algorithm, needleBytes).newSearchProcessor()));
needleBytes[needleLen - 1] = 0;
needleBytes[0] = 1; // 100...000
assertEquals(-1, haystack.forEachByte(factory(algorithm, needleBytes).newSearchProcessor()));
}
Domain
Subdomains
Source
Frequently Asked Questions
What does testLongInputs() do?
testLongInputs() is a function in the netty codebase, defined in buffer/src/test/java/io/netty/buffer/search/SearchProcessorTest.java.
Where is testLongInputs() defined?
testLongInputs() is defined in buffer/src/test/java/io/netty/buffer/search/SearchProcessorTest.java at line 117.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free