testHashCodeAscii() — netty Function Reference
Architecture documentation for the testHashCodeAscii() function in PlatformDependentTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 46c18ccd_3735_78d8_7e50_d68475399232["testHashCodeAscii()"] ff6bfe0a_3221_685f_da78_ee06b9ccc3c6["PlatformDependentTest"] 46c18ccd_3735_78d8_7e50_d68475399232 -->|defined in| ff6bfe0a_3221_685f_da78_ee06b9ccc3c6 9c1274d9_2a09_e656_a236_b73212949bb4["randomCharInByteRange()"] 46c18ccd_3735_78d8_7e50_d68475399232 -->|calls| 9c1274d9_2a09_e656_a236_b73212949bb4 style 46c18ccd_3735_78d8_7e50_d68475399232 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
common/src/test/java/io/netty/util/internal/PlatformDependentTest.java lines 135–153
@Test
public void testHashCodeAscii() {
for (int i = 0; i < 1000; ++i) {
// byte[] and char[] need to be initialized such that there values are within valid "ascii" range
byte[] bytes = new byte[i];
char[] bytesChar = new char[i];
for (int j = 0; j < bytesChar.length; ++j) {
bytesChar[j] = randomCharInByteRange();
bytes[j] = (byte) (bytesChar[j] & 0xff);
}
String string = new String(bytesChar);
assertEquals(hashCodeAsciiSafe(bytes, 0, bytes.length),
hashCodeAscii(bytes, 0, bytes.length),
"length=" + i);
assertEquals(hashCodeAscii(bytes, 0, bytes.length),
hashCodeAscii(string),
"length=" + i);
}
}
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does testHashCodeAscii() do?
testHashCodeAscii() is a function in the netty codebase, defined in common/src/test/java/io/netty/util/internal/PlatformDependentTest.java.
Where is testHashCodeAscii() defined?
testHashCodeAscii() is defined in common/src/test/java/io/netty/util/internal/PlatformDependentTest.java at line 135.
What does testHashCodeAscii() call?
testHashCodeAscii() calls 1 function(s): randomCharInByteRange.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free