From 826c1fb37e4b3c04df40ef478b3637b0a54e5c4c Mon Sep 17 00:00:00 2001 From: kak Date: Thu, 26 Feb 2015 07:42:30 -0800 Subject: [PATCH] Add test case for assertThat(List). ------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=87251149 --- .../test/java/com/google/common/truth/IterableTest.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/src/test/java/com/google/common/truth/IterableTest.java b/core/src/test/java/com/google/common/truth/IterableTest.java index 28b98644e..7ba20da7a 100644 --- a/core/src/test/java/com/google/common/truth/IterableTest.java +++ b/core/src/test/java/com/google/common/truth/IterableTest.java @@ -326,6 +326,13 @@ public class IterableTest { } } + @Test public void listContainsExactlyArray() { + String[] stringArray = { "a", "b" }; + ImmutableList iterable = ImmutableList.of(stringArray); + // This test fails w/o the explicit cast + assertThat(iterable).containsExactly((Object) stringArray); + } + @Test public void arrayContainsExactly() { ImmutableList iterable = ImmutableList.of("a", "b"); String[] array = { "a", "b" };