testUniqueLen64Substrings() — netty Function Reference
Architecture documentation for the testUniqueLen64Substrings() function in SearchProcessorTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 60a2ca70_34a0_e689_6766_3909f2e06fa3["testUniqueLen64Substrings()"] 77fd8c98_90ee_f735_3303_8eafc0856e0c["SearchProcessorTest"] 60a2ca70_34a0_e689_6766_3909f2e06fa3 -->|defined in| 77fd8c98_90ee_f735_3303_8eafc0856e0c style 60a2ca70_34a0_e689_6766_3909f2e06fa3 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
buffer/src/test/java/io/netty/buffer/search/SearchProcessorTest.java lines 141–157
@ParameterizedTest
@EnumSource(Algorithm.class)
public void testUniqueLen64Substrings(Algorithm algorithm) {
final byte[] haystackBytes = new byte[32 * 65]; // 1, 2, 2, 3, 3, 3, 4, 4, 4, 4, ...
int pos = 0;
for (int i = 1; i <= 64; i++) {
for (int j = 0; j < i; j++) {
haystackBytes[pos++] = (byte) i;
}
}
final ByteBuf haystack = Unpooled.copiedBuffer(haystackBytes);
for (int start = 0; start < haystackBytes.length - 64; start++) {
final byte[] needle = Arrays.copyOfRange(haystackBytes, start, start + 64);
assertEquals(start + 63, haystack.forEachByte(factory(algorithm, needle).newSearchProcessor()));
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does testUniqueLen64Substrings() do?
testUniqueLen64Substrings() is a function in the netty codebase, defined in buffer/src/test/java/io/netty/buffer/search/SearchProcessorTest.java.
Where is testUniqueLen64Substrings() defined?
testUniqueLen64Substrings() is defined in buffer/src/test/java/io/netty/buffer/search/SearchProcessorTest.java at line 141.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free