diff options
author | Karl Rosaen <krosaen@android.com> | 2009-06-29 18:06:40 -0700 |
---|---|---|
committer | Karl Rosaen <krosaen@android.com> | 2009-06-29 18:06:40 -0700 |
commit | 97eb32e2cad1871f89f9d7e91681b2977c8a4d19 (patch) | |
tree | e15ba1bd3b402043351a085a1917a184915987f9 /test-runner/android | |
parent | c25dbf88fc21c707b72502c43695c2c31ff22a23 (diff) | |
download | frameworks_base-97eb32e2cad1871f89f9d7e91681b2977c8a4d19.zip frameworks_base-97eb32e2cad1871f89f9d7e91681b2977c8a4d19.tar.gz frameworks_base-97eb32e2cad1871f89f9d7e91681b2977c8a4d19.tar.bz2 |
Fix assertContentsInOrder (bug 1790350).
if we ever get an updated Lists class that includes a
Lists.newArrayList(Iterable<?>
implementation, that would work too.
Diffstat (limited to 'test-runner/android')
-rw-r--r-- | test-runner/android/test/MoreAsserts.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test-runner/android/test/MoreAsserts.java b/test-runner/android/test/MoreAsserts.java index 2e74644..9e0d018 100644 --- a/test-runner/android/test/MoreAsserts.java +++ b/test-runner/android/test/MoreAsserts.java @@ -24,6 +24,7 @@ import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; +import java.util.ArrayList; import java.util.regex.MatchResult; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -316,8 +317,11 @@ public final class MoreAsserts { */ public static void assertContentsInOrder( String message, Iterable<?> actual, Object... expected) { - Assert.assertEquals(message, - Arrays.asList(expected), Lists.newArrayList(actual)); + ArrayList actualList = new ArrayList(); + for (Object o : actual) { + actualList.add(o); + } + Assert.assertEquals(message, Arrays.asList(expected), actualList); } /** |