Skip to content

Commit

Permalink
Add test case for assertThat(List<String[]>).
Browse files Browse the repository at this point in the history
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=87251149
  • Loading branch information
kluever authored and cpovirk committed Mar 3, 2015
1 parent c168447 commit 826c1fb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions core/src/test/java/com/google/common/truth/IterableTest.java
Expand Up @@ -326,6 +326,13 @@ public class IterableTest {
}
}

@Test public void listContainsExactlyArray() {
String[] stringArray = { "a", "b" };
ImmutableList<String[]> iterable = ImmutableList.of(stringArray);
// This test fails w/o the explicit cast
assertThat(iterable).containsExactly((Object) stringArray);
}

@Test public void arrayContainsExactly() {
ImmutableList<String> iterable = ImmutableList.of("a", "b");
String[] array = { "a", "b" };
Expand Down

0 comments on commit 826c1fb

Please sign in to comment.