Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
chaokunyang committed Sep 9, 2024
1 parent 7b3306d commit 43e94ac
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import java.util.Collections;
import java.util.Comparator;
import java.util.EnumSet;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashSet;
Expand Down Expand Up @@ -401,15 +402,20 @@ public static class CollectionViewTestStruct {

@Test(dataProvider = "javaFury")
public void testSetFromMap(Fury fury) {
final Set<String> set = Collections.newSetFromMap(Maps.newConcurrentMap());
Set<String> set = Collections.newSetFromMap(Maps.newConcurrentMap());
set.add("a");
set.add("b");
set.add("c");
Assert.assertEquals(set, serDe(fury, set));
serDeCheck(fury, set);
Assert.assertEquals(
getJavaFury().getClassResolver().getSerializerClass(set.getClass()),
CollectionSerializers.SetFromMapSerializer.class);
serDeCheck(fury, new CollectionViewTestStruct(set, set));
set = Collections.newSetFromMap(new HashMap<String, Boolean>() {});
set.add("a");
set.add("b");
serDeCheck(fury, set);
serDeCheck(fury, new CollectionViewTestStruct(set, set));
}

@Test(dataProvider = "furyCopyConfig")
Expand Down

0 comments on commit 43e94ac

Please sign in to comment.