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

Side by Side Diff: tests/compiler/dart2js/sourcemaps/multi_source_info_test.dart

Issue 2690083002: Add MultiSourceInformationStrategy (Closed)
Patch Set: Cleanup. Created 3 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 import 'dart:async';
6 import 'package:async_helper/async_helper.dart';
7 import 'package:compiler/compiler_new.dart';
8 import 'package:compiler/src/commandline_options.dart';
9 import 'package:expect/expect.dart';
10 import '../memory_compiler.dart';
11
12 main() {
13 asyncTest(() async {
14 String oldMap = (await compile([])).getOutput('', OutputType.js_map);
15 String newMap = (await compile([Flags.useNewSourceInfo]))
16 .getOutput('', OutputType.js_map);
17 OutputCollector multiCollector1 = await compile([Flags.useMultiSourceInfo]);
18 String multiMap1a = multiCollector1.getOutput('', OutputType.js_map);
19 String multiMap1b = multiCollector1.getOutput('out.js', OutputType.js_map);
20 Expect.equals(oldMap, multiMap1a);
21 Expect.equals(newMap, multiMap1b);
22 OutputCollector multiCollector2 =
23 await compile([Flags.useMultiSourceInfo, Flags.useNewSourceInfo]);
24 String multiMap2a = multiCollector2.getOutput('', OutputType.js_map);
25 String multiMap2b = multiCollector2.getOutput('out.js', OutputType.js_map);
26 Expect.equals(newMap, multiMap2a);
27 Expect.equals(oldMap, multiMap2b);
28 });
29 }
30
31 Future<OutputCollector> compile(List<String> options) async {
32 OutputCollector collector = new OutputCollector();
33 await runCompiler(
34 entryPoint: Uri.parse('memory:main.dart'),
35 memorySourceFiles: const {'main.dart': 'main() {}'},
36 outputProvider: collector,
37 options: options);
38 return collector;
39 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/sourcemaps/js_tracer.dart ('k') | tests/compiler/dart2js/sourcemaps/sourcemap_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698