| Index: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/EngineTestCase.java
|
| diff --git a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/EngineTestCase.java b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/EngineTestCase.java
|
| index 82fcbb9517cbab8ed7621aee9ad77558b8c0fbe8..3e276d3d5c990d6087e7147b0bfc930a92c714e4 100644
|
| --- a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/EngineTestCase.java
|
| +++ b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/EngineTestCase.java
|
| @@ -31,6 +31,7 @@ import junit.framework.Assert;
|
| import junit.framework.AssertionFailedError;
|
| import junit.framework.TestCase;
|
|
|
| +import java.util.Collection;
|
| import java.util.List;
|
| import java.util.Map;
|
| import java.util.Set;
|
| @@ -282,6 +283,22 @@ public class EngineTestCase extends TestCase {
|
| }
|
|
|
| /**
|
| + * Assert that the given collection is non-{@code null} and has the expected number of elements.
|
| + *
|
| + * @param expectedSize the expected number of elements
|
| + * @param c the collection being tested
|
| + * @throws AssertionFailedError if the list is {@code null} or does not have the expected number
|
| + * of elements
|
| + */
|
| + public static void assertCollectionSize(int expectedSize, Collection<?> c) {
|
| + if (c == null) {
|
| + fail("Expected collection of size " + expectedSize + "; found null");
|
| + } else if (c.size() != expectedSize) {
|
| + fail("Expected collection of size " + expectedSize + "; contained " + c.size() + " elements");
|
| + }
|
| + }
|
| +
|
| + /**
|
| * Assert that the given list is non-{@code null} and has the expected number of elements.
|
| *
|
| * @param expectedSize the expected number of elements
|
|
|