testHashCode() — netty Function Reference
Architecture documentation for the testHashCode() function in UnpooledTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 12a1b082_a04c_19fc_ffa0_3ecf4693cbf1["testHashCode()"] 57588d83_f329_0d85_cfc5_eea9b8d43e8f["UnpooledTest"] 12a1b082_a04c_19fc_ffa0_3ecf4693cbf1 -->|defined in| 57588d83_f329_0d85_cfc5_eea9b8d43e8f style 12a1b082_a04c_19fc_ffa0_3ecf4693cbf1 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
buffer/src/test/java/io/netty/buffer/UnpooledTest.java lines 70–89
@Test
public void testHashCode() {
Map<byte[], Integer> map = new LinkedHashMap<byte[], Integer>();
map.put(EMPTY_BYTES, 1);
map.put(new byte[] { 1 }, 32);
map.put(new byte[] { 2 }, 33);
map.put(new byte[] { 0, 1 }, 962);
map.put(new byte[] { 1, 2 }, 994);
map.put(new byte[] { 0, 1, 2, 3, 4, 5 }, 63504931);
map.put(new byte[] { 6, 7, 8, 9, 0, 1 }, (int) 97180294697L);
map.put(new byte[] { -1, -1, -1, (byte) 0xE1 }, 1);
for (Entry<byte[], Integer> e: map.entrySet()) {
ByteBuf buffer = wrappedBuffer(e.getKey());
assertEquals(
e.getValue().intValue(),
ByteBufUtil.hashCode(buffer));
buffer.release();
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does testHashCode() do?
testHashCode() is a function in the netty codebase, defined in buffer/src/test/java/io/netty/buffer/UnpooledTest.java.
Where is testHashCode() defined?
testHashCode() is defined in buffer/src/test/java/io/netty/buffer/UnpooledTest.java at line 70.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free