testCompare() — netty Function Reference
Architecture documentation for the testCompare() function in ConstantPoolTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 1a30cabc_fd45_8f08_1cab_511b94566948["testCompare()"] c22de75b_e5fe_b5d4_e96a_04ad688a0dfb["ConstantPoolTest"] 1a30cabc_fd45_8f08_1cab_511b94566948 -->|defined in| c22de75b_e5fe_b5d4_e96a_04ad688a0dfb style 1a30cabc_fd45_8f08_1cab_511b94566948 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
common/src/test/java/io/netty/util/ConstantPoolTest.java lines 71–102
@Test
public void testCompare() {
TestConstant a = pool.valueOf("a_alpha");
TestConstant b = pool.valueOf("b_beta");
TestConstant c = pool.valueOf("c_gamma");
TestConstant d = pool.valueOf("d_delta");
TestConstant e = pool.valueOf("e_epsilon");
Set<TestConstant> set = new TreeSet<TestConstant>();
set.add(b);
set.add(c);
set.add(e);
set.add(d);
set.add(a);
TestConstant[] array = set.toArray(new TestConstant[0]);
assertEquals(5, array.length);
// Sort by name
Arrays.sort(array, new Comparator<TestConstant>() {
@Override
public int compare(TestConstant o1, TestConstant o2) {
return o1.name().compareTo(o2.name());
}
});
assertSame(a, array[0]);
assertSame(b, array[1]);
assertSame(c, array[2]);
assertSame(d, array[3]);
assertSame(e, array[4]);
}
Domain
Subdomains
Source
Frequently Asked Questions
What does testCompare() do?
testCompare() is a function in the netty codebase, defined in common/src/test/java/io/netty/util/ConstantPoolTest.java.
Where is testCompare() defined?
testCompare() is defined in common/src/test/java/io/netty/util/ConstantPoolTest.java at line 71.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free