| Index: editor/tools/plugins/com.google.dart.tools.core_test/src/com/google/dart/tools/core/internal/model/SystemLibraryManagerProviderTest.java
|
| ===================================================================
|
| --- editor/tools/plugins/com.google.dart.tools.core_test/src/com/google/dart/tools/core/internal/model/SystemLibraryManagerProviderTest.java (revision 5968)
|
| +++ editor/tools/plugins/com.google.dart.tools.core_test/src/com/google/dart/tools/core/internal/model/SystemLibraryManagerProviderTest.java (working copy)
|
| @@ -18,6 +18,7 @@
|
| import java.net.URI;
|
| import java.net.URISyntaxException;
|
| import java.util.Collection;
|
| +import java.util.HashSet;
|
|
|
| public abstract class SystemLibraryManagerProviderTest extends TestCase {
|
|
|
| @@ -59,6 +60,21 @@
|
| assertTrue(specs.contains("dart:uri"));
|
| }
|
|
|
| + public void test_SystemLibraryManagerProvider_getAllLibrarySpecs_no_duplicates() throws Exception {
|
| + EditorLibraryManager libraryManager = getLibraryManager();
|
| + Collection<String> specs = libraryManager.getAllLibrarySpecs();
|
| + Collection<String> visited = new HashSet<String>();
|
| + String actual = "";
|
| + for (String eachSpec : specs) {
|
| + if (visited.contains(eachSpec)) {
|
| + actual += eachSpec + ", ";
|
| + } else {
|
| + visited.add(eachSpec);
|
| + }
|
| + }
|
| + assertEquals("", actual);
|
| + }
|
| +
|
| public void test_SystemLibraryManagerProvider_translateDoesNotExist() throws Exception {
|
| URI fullUri = new URI("dart://doesnotexist/some/file.dart");
|
| try {
|
|
|