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

Unified Diff: pkg/code_transformers/test/resolver_test.dart

Issue 315813003: Support using a mock SDK with the resolver in code-transformers, and switch (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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/code_transformers/pubspec.yaml ('k') | pkg/polymer/lib/src/build/script_compactor.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/code_transformers/test/resolver_test.dart
diff --git a/pkg/code_transformers/test/resolver_test.dart b/pkg/code_transformers/test/resolver_test.dart
index 3ab00e741e5151b5327e77e1d487c9876c59e2e9..5807fd718eca15b1067d5a1700bbd15d8d016b0d 100644
--- a/pkg/code_transformers/test/resolver_test.dart
+++ b/pkg/code_transformers/test/resolver_test.dart
@@ -14,9 +14,21 @@ import 'package:unittest/unittest.dart';
main() {
useCompactVMConfiguration();
- var entryPoint = new AssetId('a', 'web/main.dart');
- var resolvers = new Resolvers(testingDartSdkDirectory);
+ group('mock sdk', () {
+ resolverTests(new Resolvers.fromMock({
+ 'dart:core': 'library dart.core;\nclass Object {}',
+ 'dart:async': 'library dart.async;',
+ 'dart:html': 'library dart.html;',
+ }));
+ });
+
+ group('real sdk', () {
+ resolverTests(new Resolvers(testingDartSdkDirectory));
+ });
+}
+resolverTests(Resolvers resolvers) {
+ var entryPoint = new AssetId('a', 'web/main.dart');
Future validateResolver({Map<String, String> inputs, validator(Resolver),
List<String> messages: const[]}) {
return applyTransformers(
« no previous file with comments | « pkg/code_transformers/pubspec.yaml ('k') | pkg/polymer/lib/src/build/script_compactor.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698