()
| 130 | |
| 131 | |
| 132 | @Test |
| 133 | public void testSubSet() |
| 134 | { |
| 135 | System.out.println("subset"); |
| 136 | |
| 137 | SortedSet<Integer> groundTruth = new TreeSet<Integer>(); |
| 138 | IntSortedSet testSet = new IntSortedSet(); |
| 139 | |
| 140 | for (int i = 1; i < 20; i++) |
| 141 | for (int j = i * 20; j < (i + 1) * 20; j += i) |
| 142 | { |
| 143 | groundTruth.add(j); |
| 144 | testSet.add(j); |
| 145 | } |
| 146 | |
| 147 | assertSameContent(groundTruth, testSet); |
| 148 | |
| 149 | Random rand = RandomUtil.getRandom(); |
| 150 | |
| 151 | testHeadSet(groundTruth, testSet, rand, 3); |
| 152 | testTailSet(groundTruth, testSet, rand, 3); |
| 153 | testSubSet(groundTruth, testSet, rand, 3); |
| 154 | } |
| 155 | |
| 156 | private void testHeadSet(SortedSet<Integer> groundTruth, SortedSet<Integer> testSet, Random rand, int depth) |
| 157 | { |
nothing calls this directly
no test coverage detected