Skip to content

Commit

Permalink
mP1/walkingkooka#2773 SortedSets & ImmutableSortedSet
Browse files Browse the repository at this point in the history
- mP1/walkingkooka#2773
- SortedSets & ImmutableSortedSet
  • Loading branch information
mP1 committed Sep 5, 2024
1 parent 0c5f492 commit 1a34c44
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import org.junit.jupiter.api.Test;
import walkingkooka.HashCodeEqualsDefinedTesting2;
import walkingkooka.ToStringTesting;
import walkingkooka.collect.set.Sets;
import walkingkooka.collect.set.SortedSets;
import walkingkooka.j2cl.locale.WalkingkookaLanguageTag;
import walkingkooka.predicate.Predicates;

Expand All @@ -46,7 +46,7 @@ public final class DateFormatSymbolsTest extends JavaTextTestCase<DateFormatSymb
public void testGetAvailableLocales() {
final Comparator<Locale> comparator = (l, r) -> l.toLanguageTag().compareTo(r.toLanguageTag());

final Set<Locale> jdk = Sets.sorted(comparator);
final Set<Locale> jdk = SortedSets.tree(comparator);
for(final Locale locale : java.text.DateFormatSymbols.getAvailableLocales()) {
switch(locale.toString()) {
case "th_TH_TH_#u-nu-thai":
Expand All @@ -58,7 +58,7 @@ public void testGetAvailableLocales() {
}
}

final Set<Locale> emulated = Sets.sorted(comparator);
final Set<Locale> emulated = SortedSets.tree(comparator);
emulated.addAll(Arrays.asList(DateFormatSymbols.getAvailableLocales()));

this.checkEquals(jdk, emulated);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import org.junit.jupiter.api.Test;
import walkingkooka.HashCodeEqualsDefinedTesting2;
import walkingkooka.ToStringTesting;
import walkingkooka.collect.set.Sets;
import walkingkooka.collect.set.SortedSets;
import walkingkooka.j2cl.java.io.string.StringDataInputDataOutput;
import walkingkooka.j2cl.java.text.generated.DateFormatSymbolsProvider;
import walkingkooka.j2cl.locale.WalkingkookaLanguageTag;
Expand Down Expand Up @@ -66,7 +66,7 @@ public void testRegisterThenDataInputThrowsEOF() throws Exception {
public void testGetAvailableLocales() {
final Comparator<Locale> comparator = (l, r) -> l.toLanguageTag().compareTo(r.toLanguageTag());

final Set<Locale> jdk = Sets.sorted(comparator);
final Set<Locale> jdk = SortedSets.tree(comparator);
for (final Locale locale : java.text.DateFormatSymbols.getAvailableLocales()) {
switch (locale.toString()) {
case "th_TH_TH_#u-nu-thai":
Expand All @@ -78,7 +78,7 @@ public void testGetAvailableLocales() {
}
}

final Set<Locale> emulated = Sets.sorted(comparator);
final Set<Locale> emulated = SortedSets.tree(comparator);
emulated.addAll(Arrays.asList(DecimalFormatSymbols.getAvailableLocales()));

this.checkEquals(jdk, emulated);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
package walkingkooka.j2cl.java.text;

import org.junit.jupiter.api.Test;
import walkingkooka.collect.set.Sets;
import walkingkooka.collect.set.SortedSets;

import java.lang.reflect.Field;
import java.lang.reflect.Method;
Expand Down Expand Up @@ -54,7 +54,7 @@ public void testIntegerField() {
public void testGetAvailableLocales() {
final Comparator<Locale> comparator = (l, r) -> l.toLanguageTag().compareTo(r.toLanguageTag());

final Set<Locale> jdk = Sets.sorted(comparator);
final Set<Locale> jdk = SortedSets.tree(comparator);
for(final Locale locale : java.text.DateFormatSymbols.getAvailableLocales()) {
switch(locale.toString()) {
case "th_TH_TH_#u-nu-thai":
Expand All @@ -66,7 +66,7 @@ public void testGetAvailableLocales() {
}
}

final Set<Locale> emulated = Sets.sorted(comparator);
final Set<Locale> emulated = SortedSets.tree(comparator);
emulated.addAll(Arrays.asList(NumberFormat.getAvailableLocales()));

this.checkEquals(jdk, emulated);
Expand Down

0 comments on commit 1a34c44

Please sign in to comment.