| Index: editor/tools/plugins/com.google.dart.tools.core_test/src/com/google/dart/tools/core/internal/model/DartLibraryImplTest.java
|
| ===================================================================
|
| --- editor/tools/plugins/com.google.dart.tools.core_test/src/com/google/dart/tools/core/internal/model/DartLibraryImplTest.java (revision 1856)
|
| +++ editor/tools/plugins/com.google.dart.tools.core_test/src/com/google/dart/tools/core/internal/model/DartLibraryImplTest.java (working copy)
|
| @@ -275,6 +275,11 @@
|
| assertTrue(children.length > 20);
|
| }
|
|
|
| + public void test_DartLibraryImpl_getChildren_libJson() throws Exception {
|
| + DartElement[] children = getDartLibJson().getChildren();
|
| + assertContainsCompUnit(children, "json.dart", false, false);
|
| + }
|
| +
|
| public void test_DartLibraryImpl_getCompilationUnits_lib1() throws Exception {
|
| assertEquals(2, getDartLib1().getCompilationUnits().length);
|
| }
|
| @@ -326,6 +331,14 @@
|
| getDartLib3().getElementName());
|
| }
|
|
|
| + public void test_DartLibraryImpl_getElementName_libCore() throws Exception {
|
| + assertEquals("dart:core", getDartLibCore().getElementName());
|
| + }
|
| +
|
| + public void test_DartLibraryImpl_getElementName_libCoreImpl() throws Exception {
|
| + assertEquals("dart:core_impl", getDartLibCoreImpl().getElementName());
|
| + }
|
| +
|
| public void test_DartLibraryImpl_getElementName_libDom() throws Exception {
|
| assertEquals("dart:dom", getDartLibDom().getElementName());
|
| }
|
| @@ -422,6 +435,17 @@
|
| assertDartLib3ImportedLibraries();
|
| }
|
|
|
| + public void test_DartLibraryImpl_getImportedLibraries_libCore() throws Exception {
|
| + DartLibrary[] importedLibraries = getDartLibCore().getImportedLibraries();
|
| + assertEquals(1, importedLibraries.length);
|
| + assertEquals("dart:core_impl", importedLibraries[0].getElementName());
|
| + }
|
| +
|
| + public void test_DartLibraryImpl_getImportedLibraries_libCoreImpl() throws Exception {
|
| + DartLibrary[] importedLibraries = getDartLibCoreImpl().getImportedLibraries();
|
| + assertEquals(0, importedLibraries.length);
|
| + }
|
| +
|
| public void test_DartLibraryImpl_getImportedLibraries_libDom() throws Exception {
|
| DartLibrary[] importedLibraries = getDartLibDom().getImportedLibraries();
|
| assertEquals(0, importedLibraries.length);
|
| @@ -438,6 +462,12 @@
|
| assertEquals(1, importedLibraries.length);
|
| }
|
|
|
| + public void test_DartLibraryImpl_getImportedLibraries_libHtml() throws Exception {
|
| + DartLibrary[] importedLibraries = getDartLibHtml().getImportedLibraries();
|
| + assertEquals(1, importedLibraries.length);
|
| + assertEquals("dart:dom", importedLibraries[0].getElementName());
|
| + }
|
| +
|
| public void test_DartLibraryImpl_isTopLevel() throws Exception {
|
| assertFalse(getDartLibEmpty().isTopLevel());
|
| }
|
| @@ -722,6 +752,10 @@
|
| return getBundledLib("dart:html");
|
| }
|
|
|
| + private DartLibraryImpl getDartLibJson() throws Exception {
|
| + return getBundledLib("dart:json");
|
| + }
|
| +
|
| private DartModelImpl getDartModel() {
|
| return DartModelManager.getInstance().getDartModel();
|
| }
|
|
|