Skip to content

Commit

Permalink
Re-adding emptyList, emptySet and emptyMap templates
Browse files Browse the repository at this point in the history
  • Loading branch information
vmussatto committed Apr 1, 2022
1 parent bd0bb62 commit 064f1ac
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,11 @@ List<T> before() {
return List.of();
}

@BeforeTemplate
List<T> before2() {
return Collections.emptyList();
}

@AfterTemplate
ImmutableList<T> after() {
return ImmutableList.of();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,11 @@ Map<K, V> before() {
return Map.of();
}

@BeforeTemplate
Map<K, V> before2() {
return Collections.emptyMap();
}

@AfterTemplate
ImmutableMap<K, V> after() {
return ImmutableMap.of();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,11 @@ Set<T> before() {
return Set.of();
}

@BeforeTemplate
Set<T> before2() {
return Collections.emptySet();
}

@AfterTemplate
ImmutableSet<T> after() {
return ImmutableSet.of();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ ImmutableList<Integer> testStreamToDistinctImmutableList() {
return Stream.of(1).distinct().collect(toImmutableList());
}

List<Object> testImmutableListOf() {
return List.of();
ImmutableSet<List<Object>> testImmutableListOf() {
return ImmutableSet.of(List.of(), Collections.emptyList());
}

List<Integer> testImmutableListOf1() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ ImmutableList<Integer> testStreamToDistinctImmutableList() {
return Stream.of(1).collect(toImmutableSet()).asList();
}

List<Object> testImmutableListOf() {
return ImmutableList.of();
ImmutableSet<List<Object>> testImmutableListOf() {
return ImmutableSet.of(ImmutableList.of(), ImmutableList.of());
}

List<Integer> testImmutableListOf1() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ ImmutableMap<String, Integer> testImmutableMapCopyOfImmutableMap() {
return ImmutableMap.copyOf(ImmutableMap.of("foo", 1));
}

Map<Object, Object> testImmutableMapOf() {
return Map.of();
ImmutableSet<Map<Object, Object>> testImmutableMapOf() {
return ImmutableSet.of(Map.of(), Collections.emptyMap());
}

Map<String, String> testImmutableMapOf1() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ ImmutableMap<String, Integer> testImmutableMapCopyOfImmutableMap() {
return ImmutableMap.of("foo", 1);
}

Map<Object, Object> testImmutableMapOf() {
return ImmutableMap.of();
ImmutableSet<Map<Object, Object>> testImmutableMapOf() {
return ImmutableSet.of(ImmutableMap.of(), ImmutableMap.of());
}

Map<String, String> testImmutableMapOf1() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ ImmutableSet<Integer> testImmutableSetCopyOfSetView() {
return ImmutableSet.copyOf(Sets.difference(ImmutableSet.of(1), ImmutableSet.of(2)));
}

Set<Object> testImmutableSetOf() {
return Set.of();
ImmutableSet<Set<Object>> testImmutableSetOf() {
return ImmutableSet.of(Set.of(), Collections.emptySet());
}

Set<Integer> testImmutableSetOf1() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ ImmutableSet<Integer> testImmutableSetCopyOfSetView() {
return Sets.difference(ImmutableSet.of(1), ImmutableSet.of(2)).immutableCopy();
}

Set<Object> testImmutableSetOf() {
return ImmutableSet.of();
ImmutableSet<Set<Object>> testImmutableSetOf() {
return ImmutableSet.of(ImmutableSet.of(), ImmutableSet.of());
}

Set<Integer> testImmutableSetOf1() {
Expand Down

0 comments on commit 064f1ac

Please sign in to comment.