public void testCopyOf_comparator() { SortedSet<String> set = copyOf(asList("e", "a", "f", "b", "d", "c")); assertSame(Ordering.natural(), set.comparator()); }
public void testCopyOf_sortedSet_comparator() { SortedSet<String> set = copyOf(Sets.<String>newTreeSet()); assertSame(Ordering.natural(), set.comparator()); }
public void testCopyOf_sortedSet_ordering() { SortedSet<String> set = copyOf(Sets.newTreeSet(asList("e", "a", "f", "b", "d", "c"))); assertThat(set).containsExactly("a", "b", "c", "d", "e", "f").inOrder(); }
public void testCopyOf_sortedSetIterable() { SortedSet<String> input = Sets.newTreeSet(STRING_LENGTH); Collections.addAll(input, "in", "the", "quick", "jumped", "over", "a"); SortedSet<String> set = copyOf(input); assertThat(set).containsExactly("a", "in", "jumped", "over", "quick", "the").inOrder(); }
public void testCopyOf_headSet() { SortedSet<String> set = of("e", "a", "f", "b", "d", "c"); SortedSet<String> headset = set.headSet("d"); SortedSet<String> copy = copyOf(headset); assertEquals(headset, copy); }
public void testCopyOf_ordering() { SortedSet<String> set = copyOf(asList("e", "a", "f", "b", "d", "c")); assertThat(set).containsExactly("a", "b", "c", "d", "e", "f").inOrder(); }
public void testCopyOf_ordering_dupes() { SortedSet<String> set = copyOf(asList("e", "a", "e", "f", "b", "b", "d", "a", "c")); assertThat(set).containsExactly("a", "b", "c", "d", "e", "f").inOrder(); }
public void testCopyOf_iterator_comparator() { SortedSet<String> set = copyOf(asIterator("e", "a", "f", "b", "d", "c")); assertSame(Ordering.natural(), set.comparator()); }
public void testCopyOf_tailSet() { SortedSet<String> set = of("e", "a", "f", "b", "d", "c"); SortedSet<String> tailset = set.tailSet("d"); SortedSet<String> copy = copyOf(tailset); assertEquals(tailset, copy); }
public void testCopyOf_iterator_ordering() { SortedSet<String> set = copyOf(asIterator("e", "a", "f", "b", "d", "c")); assertThat(set).containsExactly("a", "b", "c", "d", "e", "f").inOrder(); }
public void testCopyOf_iterator_ordering_dupes() { SortedSet<String> set = copyOf(asIterator("e", "a", "e", "f", "b", "b", "d", "a", "c")); assertThat(set).containsExactly("a", "b", "c", "d", "e", "f").inOrder(); }
public void testCopyOf_subSet() { SortedSet<String> set = of("e", "a", "f", "b", "d", "c"); SortedSet<String> subset = set.subSet("c", "e"); SortedSet<String> copy = copyOf(subset); assertEquals(subset, copy); }
public void testCopyOf_comparator() { SortedSet<String> set = copyOf(asList("e", "a", "f", "b", "d", "c")); assertSame(Ordering.natural(), set.comparator()); }
public void testCopyOf_sortedSetIterable() { SortedSet<String> input = Sets.newTreeSet(STRING_LENGTH); Collections.addAll(input, "in", "the", "quick", "jumped", "over", "a"); SortedSet<String> set = copyOf(input); assertThat(set).containsExactly("a", "in", "jumped", "over", "quick", "the").inOrder(); }
public void testCopyOf_sortedSet_ordering() { SortedSet<String> set = copyOf(Sets.newTreeSet(asList("e", "a", "f", "b", "d", "c"))); assertThat(set).containsExactly("a", "b", "c", "d", "e", "f").inOrder(); }
public void testCopyOf_ordering() { SortedSet<String> set = copyOf(asList("e", "a", "f", "b", "d", "c")); assertThat(set).containsExactly("a", "b", "c", "d", "e", "f").inOrder(); }
public void testCopyOf_ordering_dupes() { SortedSet<String> set = copyOf(asList("e", "a", "e", "f", "b", "b", "d", "a", "c")); assertThat(set).containsExactly("a", "b", "c", "d", "e", "f").inOrder(); }
public void testCopyOf_headSet() { SortedSet<String> set = of("e", "a", "f", "b", "d", "c"); SortedSet<String> headset = set.headSet("d"); SortedSet<String> copy = copyOf(headset); assertEquals(headset, copy); }
public void testCopyOf_iterator_ordering() { SortedSet<String> set = copyOf(asIterator("e", "a", "f", "b", "d", "c")); assertThat(set).containsExactly("a", "b", "c", "d", "e", "f").inOrder(); }
public void testCopyOf_iterator_ordering_dupes() { SortedSet<String> set = copyOf(asIterator("e", "a", "e", "f", "b", "b", "d", "a", "c")); assertThat(set).containsExactly("a", "b", "c", "d", "e", "f").inOrder(); }