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); |
+ }); |
+ }); |
+} |