/external/guava/guava-tests/test/com/google/common/collect/ |
D | BstOperationsTest.java | 35 import com.google.common.collect.BstTesting.SimpleNode; 55 SimpleNode a = new SimpleNode('a', null, null); in testSeek1() 56 SimpleNode b = new SimpleNode('b', a, null); in testSeek1() 57 SimpleNode g = new SimpleNode('g', null, null); in testSeek1() 58 SimpleNode f = new SimpleNode('f', null, g); in testSeek1() 59 SimpleNode d = new SimpleNode('d', b, f); in testSeek1() 75 SimpleNode c = new SimpleNode('c', null, null); in testSeek2() 76 SimpleNode b = new SimpleNode('b', null, c); in testSeek2() 77 SimpleNode e = new SimpleNode('e', null, null); in testSeek2() 78 SimpleNode f = new SimpleNode('f', e, null); in testSeek2() [all …]
|
D | BstInOrderPathTest.java | 26 import com.google.common.collect.BstTesting.SimpleNode; 43 SimpleNode a = new SimpleNode('a', null, null); in testFullTreeRight() 44 SimpleNode c = new SimpleNode('c', null, null); in testFullTreeRight() 45 SimpleNode b = new SimpleNode('b', a, c); in testFullTreeRight() 46 SimpleNode e = new SimpleNode('e', null, null); in testFullTreeRight() 47 SimpleNode g = new SimpleNode('g', null, null); in testFullTreeRight() 48 SimpleNode f = new SimpleNode('f', e, g); in testFullTreeRight() 49 SimpleNode d = new SimpleNode('d', b, f); in testFullTreeRight() 50 BstPathFactory<SimpleNode, BstInOrderPath<SimpleNode>> factory = in testFullTreeRight() 52 BstInOrderPath<SimpleNode> path = extension(factory, d, LEFT, LEFT); in testFullTreeRight() [all …]
|
D | BstRangeOpsTest.java | 32 import com.google.common.collect.BstTesting.SimpleNode; 47 private static final SimpleNode ROOT; 50 SimpleNode a = new SimpleNode('a', null, null); 51 SimpleNode c = new SimpleNode('c', null, null); 52 SimpleNode b = new SimpleNode('b', a, c); 53 SimpleNode e = new SimpleNode('e', null, null); 54 SimpleNode g = new SimpleNode('g', null, null); 55 SimpleNode f = new SimpleNode('f', e, g); 56 SimpleNode d = new SimpleNode('d', b, f); 123 SimpleNode empty = null; in testCountInRangeEmpty() [all …]
|
D | BstNodeTest.java | 23 import com.google.common.collect.BstTesting.SimpleNode; 37 private void testLacksChild(SimpleNode node, BstSide side) { in testLacksChild() 46 private void testChildIs(SimpleNode node, BstSide side, SimpleNode expectedChild) { in testChildIs() 53 SimpleNode leaf = new SimpleNode('a', null, null); in testHasChildLeaf() 59 SimpleNode leaf = new SimpleNode('a', null, null); in testHasChildLeftOnly() 60 SimpleNode node = new SimpleNode('b', leaf, null); in testHasChildLeftOnly() 66 SimpleNode leaf = new SimpleNode('c', null, null); in testHasChildRightOnly() 67 SimpleNode node = new SimpleNode('b', null, leaf); in testHasChildRightOnly() 73 SimpleNode left = new SimpleNode('a', null, null); in testHasChildBoth() 74 SimpleNode right = new SimpleNode('c', null, null); in testHasChildBoth() [all …]
|
D | AbstractBstBalancePolicyTest.java | 21 import com.google.common.collect.BstTesting.SimpleNode; 34 protected abstract BstBalancePolicy<SimpleNode> getBalancePolicy(); in getBalancePolicy() 37 SimpleNode a = new SimpleNode('a', null, null); in testBalanceLeaf() 41 private SimpleNode balanceNew(char c, @Nullable SimpleNode left, @Nullable SimpleNode right) { in balanceNew() 42 return getBalancePolicy().balance(nodeFactory, new SimpleNode(c, null, null), left, right); in balanceNew() 49 SimpleNode c = balanceNew('c', null, null); in testBalanceTree1() 50 SimpleNode b = balanceNew('b', null, c); in testBalanceTree1() 58 SimpleNode a = balanceNew('a', null, null); in testBalanceTree2() 59 SimpleNode b = balanceNew('b', a, null); in testBalanceTree2() 67 SimpleNode a = balanceNew('a', null, null); in testBalanceTree3() [all …]
|
D | BstTesting.java | 38 static final class SimpleNode extends BstNode<Character, SimpleNode> { class in BstTesting 39 SimpleNode(Character key, @Nullable SimpleNode left, @Nullable SimpleNode right) { in SimpleNode() method in BstTesting.SimpleNode 50 if (obj instanceof SimpleNode) { in equals() 51 SimpleNode node = (SimpleNode) obj; in equals() 65 static final BstNodeFactory<SimpleNode> nodeFactory = new BstNodeFactory<SimpleNode>() { 67 public SimpleNode createNode( 68 SimpleNode source, @Nullable SimpleNode left, @Nullable SimpleNode right) { 69 return new SimpleNode(source.getKey(), left, right); 73 static final BstBalancePolicy<SimpleNode> balancePolicy = new BstBalancePolicy<SimpleNode>() { 75 public SimpleNode balance(BstNodeFactory<SimpleNode> nodeFactory, SimpleNode source, [all …]
|
D | BstPathTest.java | 18 import com.google.common.collect.BstTesting.SimpleNode; 29 static class SimplePath extends BstPath<SimpleNode, SimplePath> { 30 private SimplePath(SimpleNode tip, SimplePath tail) { in SimplePath() 36 SimpleNode root = new SimpleNode('a', null, null); in testTailAtRoot() 47 SimpleNode node = new SimpleNode('a', null, null); in testTailDown() 48 SimpleNode root = new SimpleNode('b', node, null); in testTailDown()
|
D | BstCountBasedBalancePoliciesTest.java | 20 import com.google.common.collect.BstTesting.SimpleNode; 35 protected BstBalancePolicy<SimpleNode> getBalancePolicy() { in getBalancePolicy() 42 protected BstBalancePolicy<SimpleNode> getBalancePolicy() { in getBalancePolicy() 43 return BstCountBasedBalancePolicies.<Character, SimpleNode>singleRebalancePolicy( in getBalancePolicy() 50 protected BstBalancePolicy<SimpleNode> getBalancePolicy() { in getBalancePolicy() 51 return BstCountBasedBalancePolicies.<Character, SimpleNode>fullRebalancePolicy( in getBalancePolicy()
|