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

Unified Diff: utils/tests/import_mapper/src/import_mapper_tests.dart

Issue 9369006: First prototype of import map generator. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix path to JSON. Created 8 years, 10 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 | « utils/tests/import_mapper/src/c.dart ('k') | utils/tests/import_mapper/test_config.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/tests/import_mapper/src/import_mapper_tests.dart
diff --git a/utils/tests/import_mapper/src/import_mapper_tests.dart b/utils/tests/import_mapper/src/import_mapper_tests.dart
new file mode 100644
index 0000000000000000000000000000000000000000..1b3df4dd7cc3d421e263476fdab7f27c359c6291
--- /dev/null
+++ b/utils/tests/import_mapper/src/import_mapper_tests.dart
@@ -0,0 +1,22 @@
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#library('import_mapper_tests');
+
+#import('../../../import_mapper/import_mapper.dart', prefix: 'mapper');
+
+// TODO(rnystrom): Better path to unittest.
+#import('../../../../client/testing/unittest/unittest_vm.dart');
+
+main() {
+ group('generateImportMap', () {
+ test('walks import graph', () {
+ final expected = { 'b.dart': 'b.dart', 'c.dart': 'c.dart' };
+ final actual = mapper.generateImportMap(
+ 'utils/tests/import_mapper/src/c.dart',
+ (context, name) => name);
+ expect(actual).equals(expected);
+ });
+ });
+}
« no previous file with comments | « utils/tests/import_mapper/src/c.dart ('k') | utils/tests/import_mapper/test_config.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698