Skip to content

Commit

Permalink
Merge pull request #277 from mP1/feature/mP1-walkingkooka-pull-2773-S…
Browse files Browse the repository at this point in the history
…ortedSets-N-ImmutableSortedSet

mP1/walkingkooka#2773 SortedSets & ImmutableS…
  • Loading branch information
mP1 authored Sep 5, 2024
2 parents 0c5f492 + 1a34c44 commit ec9bc6b
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 ec9bc6b

Please sign in to comment.