OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2011, the Dart project authors. | 2 * Copyright (c) 2011, the Dart project authors. |
3 * | 3 * |
4 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not u
se this file except | 4 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not u
se this file except |
5 * in compliance with the License. You may obtain a copy of the License at | 5 * in compliance with the License. You may obtain a copy of the License at |
6 * | 6 * |
7 * http://www.eclipse.org/legal/epl-v10.html | 7 * http://www.eclipse.org/legal/epl-v10.html |
8 * | 8 * |
9 * Unless required by applicable law or agreed to in writing, software distribut
ed under the License | 9 * Unless required by applicable law or agreed to in writing, software distribut
ed under the License |
10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY K
IND, either express | 10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY K
IND, either express |
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
453 | 453 |
454 public void test_DartLibraryImpl_isUnreferenced_topLevel() throws Exception { | 454 public void test_DartLibraryImpl_isUnreferenced_topLevel() throws Exception { |
455 DartLibraryImpl library = getDartLibEmpty(); | 455 DartLibraryImpl library = getDartLibEmpty(); |
456 assertTrue(library.isUnreferenced()); | 456 assertTrue(library.isUnreferenced()); |
457 library.setTopLevel(true); | 457 library.setTopLevel(true); |
458 assertFalse(library.isUnreferenced()); | 458 assertFalse(library.isUnreferenced()); |
459 library.setTopLevel(false); | 459 library.setTopLevel(false); |
460 assertTrue(library.isUnreferenced()); | 460 assertTrue(library.isUnreferenced()); |
461 } | 461 } |
462 | 462 |
| 463 public void test_DartLibraryImpl_newLibrarySourceFile() throws Exception { |
| 464 DartLibraryImpl library = getDartLibExternal(); |
| 465 assertTrue(library.getLibrarySourceFile().getUri().toString().startsWith("fi
le:/")); |
| 466 } |
| 467 |
463 public void test_DartLibraryImpl_nonExistantBundledLib() throws Exception { | 468 public void test_DartLibraryImpl_nonExistantBundledLib() throws Exception { |
464 String memento = "= {file:/some/path/to/missing_bundled_lib.dart"; | 469 String memento = "= {file:/some/path/to/missing_bundled_lib.dart"; |
465 DartLibraryImpl actual = (DartLibraryImpl) DartCore.create(memento); | 470 DartLibraryImpl actual = (DartLibraryImpl) DartCore.create(memento); |
466 assertNotNull(actual); | 471 assertNotNull(actual); |
467 } | 472 } |
468 | 473 |
469 public void test_DartLibraryImpl_nonExistantCompUnitAndBundledLib() throws Exc
eption { | 474 public void test_DartLibraryImpl_nonExistantCompUnitAndBundledLib() throws Exc
eption { |
470 String memento = "= {file:/some/path/to/missing_bundled_lib.dart!src/NonExis
tingClass.dart"; | 475 String memento = "= {file:/some/path/to/missing_bundled_lib.dart!src/NonExis
tingClass.dart"; |
471 ExternalCompilationUnitImpl actual = (ExternalCompilationUnitImpl) DartCore.
create(memento); | 476 ExternalCompilationUnitImpl actual = (ExternalCompilationUnitImpl) DartCore.
create(memento); |
472 assertNotNull(actual); | 477 assertNotNull(actual); |
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
757 createTempFile(libFile, content); | 762 createTempFile(libFile, content); |
758 if (createClass) { | 763 if (createClass) { |
759 File classFile = new File(libDir, className + ".dart"); | 764 File classFile = new File(libDir, className + ".dart"); |
760 String classContent = "class " + className + " { }"; | 765 String classContent = "class " + className + " { }"; |
761 createTempFile(classFile, classContent); | 766 createTempFile(classFile, classContent); |
762 } | 767 } |
763 } | 768 } |
764 return libFile; | 769 return libFile; |
765 } | 770 } |
766 } | 771 } |
OLD | NEW |