Chromium Code Reviews

Unified Diff: tests/compiler/dart2js/preserve_uris_test.dart

Issue 666843004: Revert "dart2js: add --preserve-uris flag." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « sdk/lib/_internal/pub_generated/lib/src/dart.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/preserve_uris_test.dart
diff --git a/tests/compiler/dart2js/preserve_uris_test.dart b/tests/compiler/dart2js/preserve_uris_test.dart
deleted file mode 100644
index e0b8f1f02ce014c67c70abf34614eb7f0488fafe..0000000000000000000000000000000000000000
--- a/tests/compiler/dart2js/preserve_uris_test.dart
+++ /dev/null
@@ -1,62 +0,0 @@
-// Copyright (c) 2014, 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.
-
-import 'dart:async';
-
-import 'package:expect/expect.dart';
-import 'package:async_helper/async_helper.dart';
-import 'memory_compiler.dart' show compilerFor, OutputCollector;
-
-const MEMORY_SOURCE_FILES = const <String, String> {
- 'main.dart': """
-library main;
-
-@MirrorsUsed(targets: const ['main', 'lib'])
-import 'dart:mirrors';
-import 'lib.dart';
-
-
-class Subclass extends Super {
- int _private;
-
- int magic() => _private++;
-}
-
-main() {
- var objects = [new Super(), new Subclass()];
- print(currentMirrorSystem().findLibrary(#main).uri);
-}
-""",
- 'lib.dart': """
-library lib;
-
-class Super {
- int _private;
-
- int magic() => _private++;
-}
-"""
-};
-
-runTest(bool preserveUris) {
- OutputCollector collector = new OutputCollector();
- var options = ["--minify"];
- if (preserveUris) options.add("--preserve-uris");
- var compiler = compilerFor(MEMORY_SOURCE_FILES,
- outputProvider: collector,
- options: options);
- return compiler.runCompiler(Uri.parse('memory:main.dart')).then((_) {
- String jsOutput = collector.getOutput('', 'js');
- Expect.equals(preserveUris, jsOutput.contains("main.dart"));
- Expect.equals(preserveUris, jsOutput.contains("lib.dart"));
- });
-}
-
-void main() {
- asyncStart();
- new Future.value()
- .then((_) => runTest(true))
- .then((_) => runTest(false))
- .whenComplete(asyncEnd);
-}
« no previous file with comments | « sdk/lib/_internal/pub_generated/lib/src/dart.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine