Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1373)

Unified Diff: dart/editor/tools/plugins/com.google.dart.tools.core_test/src/com/google/dart/tools/core/internal/analysis/model/ProjectImplTest.java

Issue 126303002: Version 1.1.0-dev.5.3 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: dart/editor/tools/plugins/com.google.dart.tools.core_test/src/com/google/dart/tools/core/internal/analysis/model/ProjectImplTest.java
===================================================================
--- dart/editor/tools/plugins/com.google.dart.tools.core_test/src/com/google/dart/tools/core/internal/analysis/model/ProjectImplTest.java (revision 31563)
+++ dart/editor/tools/plugins/com.google.dart.tools.core_test/src/com/google/dart/tools/core/internal/analysis/model/ProjectImplTest.java (working copy)
@@ -1,11 +1,11 @@
/*
* Copyright (c) 2012, the Dart project authors.
- *
+ *
* Licensed under the Eclipse Public License v1.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
- *
+ *
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
@@ -82,8 +82,8 @@
private Index index;
public void assertUriResolvedToPackageRoot(Project project, IPath expectedPackageRoot) {
- IPath expected = expectedPackageRoot != null ? expectedPackageRoot.append("foo").append(
- "foo.dart") : null;
+ IPath expected = expectedPackageRoot != null ? expectedPackageRoot.append("foo")
+ .append("foo.dart") : null;
SourceFactory factory = project.getDefaultContext().getSourceFactory();
Source source = factory.forUri("package:foo/foo.dart");
@@ -213,8 +213,8 @@
public void test_getMultiplePackageRoots_project() throws Exception {
CmdLineOptions options = CmdLineOptions.parseCmdLine(new String[] {});
final IEclipsePreferences prefs = mock(IEclipsePreferences.class);
- when(prefs.get(DartCore.PROJECT_PREF_PACKAGE_ROOT, "")).thenReturn(
- "bar" + File.pathSeparator + "foo");
+ when(prefs.get(DartCore.PROJECT_PREF_PACKAGE_ROOT, ""))
+ .thenReturn("bar" + File.pathSeparator + "foo");
final DartCore core = mock(DartCore.class);
when(core.getProjectPreferences(projectContainer)).thenReturn(prefs);
@@ -235,8 +235,8 @@
}
public void test_getPackageRoots_global() throws Exception {
- CmdLineOptions options = CmdLineOptions.parseCmdLine(new String[] {
- "--package-root", "foo", "bar"});
+ CmdLineOptions options = CmdLineOptions.parseCmdLine(
+ new String[] {"--package-root", "foo", "bar"});
DartCore core = DartCore.getPlugin();
File[] roots = ProjectImpl.getPackageRoots(core, options, projectContainer);
@@ -546,6 +546,12 @@
assertUriResolvedToPackageRoot(project, new Path(packageRoots[0].getPath()));
}
+ public void test_resolvePathToPackage() {
+ ProjectImpl project = newTarget();
+ //TODO(keertip): implement project with ExplicitUriResolver and package map
+ // use that to verify path to package
+ }
+
public void test_resolveUriTofileInfoFile() throws IOException {
projectContainer.remove(PUBSPEC_FILE_NAME);
File parent = projectContainer.getLocation().toFile().getParentFile();

Powered by Google App Engine
This is Rietveld 408576698