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

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

Issue 11273064: Issue 5887. Parts must start with 'part of'. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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: editor/tools/plugins/com.google.dart.tools.core_test/src/com/google/dart/tools/core/analysis/ScanTaskTest.java
diff --git a/editor/tools/plugins/com.google.dart.tools.core_test/src/com/google/dart/tools/core/analysis/ScanTaskTest.java b/editor/tools/plugins/com.google.dart.tools.core_test/src/com/google/dart/tools/core/analysis/ScanTaskTest.java
index 64209dddf7a70eb2b8a2f67ec3fa3e0eea8e1db9..1db168b98ee03c5b8881898b03b9ee4ceac5e80c 100644
--- a/editor/tools/plugins/com.google.dart.tools.core_test/src/com/google/dart/tools/core/analysis/ScanTaskTest.java
+++ b/editor/tools/plugins/com.google.dart.tools.core_test/src/com/google/dart/tools/core/analysis/ScanTaskTest.java
@@ -13,12 +13,6 @@
*/
package com.google.dart.tools.core.analysis;
-import com.google.common.collect.Lists;
-import com.google.dart.compiler.PackageLibraryManager;
-import com.google.dart.engine.utilities.io.PrintStringWriter;
-import com.google.dart.tools.core.analysis.ScanTask.DartFileType;
-import com.google.dart.tools.core.internal.model.PackageLibraryManagerProvider;
-
import static com.google.dart.tools.core.analysis.AnalysisTestUtilities.assertCachedLibraries;
import static com.google.dart.tools.core.analysis.AnalysisTestUtilities.assertPackageContexts;
import static com.google.dart.tools.core.analysis.AnalysisTestUtilities.assertTrackedLibraryFiles;
@@ -26,6 +20,12 @@ import static com.google.dart.tools.core.analysis.ScanTask.DartFileType.Library;
import static com.google.dart.tools.core.analysis.ScanTask.DartFileType.PartOf;
import static com.google.dart.tools.core.analysis.ScanTask.DartFileType.Unknown;
+import com.google.common.collect.Lists;
Brian Wilkerson 2012/10/29 14:23:47 We're still getting formatting noise. We really ne
scheglov 2012/10/29 19:18:52 I will reimport imports order settings. It seems t
+import com.google.dart.compiler.PackageLibraryManager;
+import com.google.dart.engine.utilities.io.PrintStringWriter;
+import com.google.dart.tools.core.analysis.ScanTask.DartFileType;
+import com.google.dart.tools.core.internal.model.PackageLibraryManagerProvider;
+
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.IOException;
@@ -52,6 +52,30 @@ public class ScanTaskTest extends AbstractDartAnalysisTest {
private AnalysisServerAdapter server;
private Listener listener;
+ /**
+ * TODO(scheglov) disabled because now 'part of' directive required
Brian Wilkerson 2012/10/29 14:23:47 Is there any point in keeping these tests?
scheglov 2012/10/29 19:18:52 Not much, but I want to open issue for Dan to revi
+ */
+ public void _test_scan_source() throws Exception {
+ assertTrackedLibraryFiles(server);
+ server.scan(simpleMoneySrcFile, null);
+ server.start();
+ listener.waitForIdle(1, FIVE_MINUTES_MS);
+ assertTrackedLibraryFiles(server, simpleMoneySrcFile);
+ server.assertAnalyzeContext(true);
+ }
+
+ /**
+ * TODO(scheglov) disabled because now 'part of' directive required
+ */
+ public void _test_scan_sourceThenLibrary() throws Exception {
+ _test_scan_source();
+ server.resetAnalyzeContext();
+ server.scan(moneyLibFile, null);
+ listener.waitForIdle(2, FIVE_MINUTES_MS);
+ assertTrackedLibraryFiles(server, moneyLibFile);
+ server.assertAnalyzeContext(true);
+ }
+
public void test_packages_preference() throws Exception {
PackageLibraryManager libMgr = PackageLibraryManagerProvider.getAnyLibraryManager();
assertTrackedLibraryFiles(server);
@@ -125,24 +149,6 @@ public class ScanTaskTest extends AbstractDartAnalysisTest {
server.assertAnalyzeContext(false);
}
- public void test_scan_source() throws Exception {
- assertTrackedLibraryFiles(server);
- server.scan(simpleMoneySrcFile, null);
- server.start();
- listener.waitForIdle(1, FIVE_MINUTES_MS);
- assertTrackedLibraryFiles(server, simpleMoneySrcFile);
- server.assertAnalyzeContext(true);
- }
-
- public void test_scan_sourceThenLibrary() throws Exception {
- test_scan_source();
- server.resetAnalyzeContext();
- server.scan(moneyLibFile, null);
- listener.waitForIdle(2, FIVE_MINUTES_MS);
- assertTrackedLibraryFiles(server, moneyLibFile);
- server.assertAnalyzeContext(true);
- }
-
public void test_scanContent_import() throws Exception {
PrintStringWriter writer = new PrintStringWriter();
writer.println("import 'foo';");

Powered by Google App Engine
This is Rietveld 408576698