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

Unified Diff: pkg/analyzer/test/src/task/dart_test.dart

Issue 1051023004: Compute IS_CLIENT result. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 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
« no previous file with comments | « pkg/analyzer/lib/task/dart.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/src/task/dart_test.dart
diff --git a/pkg/analyzer/test/src/task/dart_test.dart b/pkg/analyzer/test/src/task/dart_test.dart
index d77dca41cf5b0eb9c2b431de7b0816da7755d0f9..07e0e516fe116a84c56ca562a39a06fe68132be7 100644
--- a/pkg/analyzer/test/src/task/dart_test.dart
+++ b/pkg/analyzer/test/src/task/dart_test.dart
@@ -745,11 +745,10 @@ part of lib;
part of lib;
'''
});
- expect(outputs, hasLength(5));
+ expect(outputs, hasLength(4));
// simple outputs
expect(outputs[BUILD_LIBRARY_ERRORS], isEmpty);
expect(outputs[IS_LAUNCHABLE], isFalse);
- expect(outputs[HAS_HTML_IMPORT], isFalse);
// LibraryElement output
expect(libraryElement, isNotNull);
expect(libraryElement.entryPoint, isNull);
@@ -873,15 +872,6 @@ part 'part.dart';
_assertErrorsWithCodes([CompileTimeErrorCode.PART_OF_NON_PART]);
}
- test_perform_hasHtmlImport() {
- _performBuildTask({
- '/lib.dart': '''
-import 'dart:html';
-'''
- });
- expect(outputs[HAS_HTML_IMPORT], isTrue);
- }
-
test_perform_isLaunchable_inDefiningUnit() {
_performBuildTask({
'/lib.dart': '''
@@ -1106,6 +1096,43 @@ library lib_d;
expect(closure, contains(coreSource));
}
}
+
+ test_perform_isClient_false() {
+ Source sourceA = _newSource('/a.dart', '''
+library lib_a;
+import 'b.dart';
+''');
+ _newSource('/b.dart', '''
+library lib_b;
+''');
+ _computeResult(sourceA, IS_CLIENT);
+ expect(task, new isInstanceOf<BuildSourceClosuresTask>());
+ expect(outputs[IS_CLIENT], isFalse);
+ }
+
+ test_perform_isClient_true_direct() {
+ Source sourceA = _newSource('/a.dart', '''
+library lib_a;
+import 'dart:html';
+''');
+ _computeResult(sourceA, IS_CLIENT);
+ expect(task, new isInstanceOf<BuildSourceClosuresTask>());
+ expect(outputs[IS_CLIENT], isTrue);
+ }
+
+ test_perform_isClient_true_indirect() {
+ Source sourceA = _newSource('/a.dart', '''
+library lib_a;
+import 'b.dart';
+''');
+ _newSource('/b.dart', '''
+library lib_b;
+import 'dart:html';
+''');
+ _computeResult(sourceA, IS_CLIENT);
+ expect(task, new isInstanceOf<BuildSourceClosuresTask>());
+ expect(outputs[IS_CLIENT], isTrue);
+ }
}
@reflectiveTest
« no previous file with comments | « pkg/analyzer/lib/task/dart.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698