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

Side by Side Diff: tests/compiler/dart2js/source_map_d2js_validity_test.dart

Issue 877753008: Fix shift in source map positions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 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. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'dart:async'; 5 import 'dart:async';
6 import 'dart:io'; 6 import 'dart:io';
7 7
8 import 'package:async_helper/async_helper.dart'; 8 import 'package:async_helper/async_helper.dart';
9 import 'package:compiler/src/dart2js.dart' as entry; 9 import 'package:compiler/src/dart2js.dart' as entry;
10 import 'package:compiler/src/apiimpl.dart'; 10 import 'package:compiler/src/apiimpl.dart';
11 import 'package:compiler/compiler.dart'; 11 import 'package:compiler/compiler.dart';
12 12
13 import 'source_map_validator_helper.dart'; 13 import 'source_map_validator_helper.dart';
14 14
15 void main() { 15 void main() {
16 String mainFile = 'tests/compiler/dart2js/source_map_validator_test_file.dart' ;
floitsch 2015/02/02 10:17:57 long line.
Johnni Winther 2015/02/02 10:49:26 Done.
16 asyncTest(() => createTempDir().then((Directory tmpDir) { 17 asyncTest(() => createTempDir().then((Directory tmpDir) {
17 print( 18 print(
18 'Compiling tests/compiler/dart2js/source_map_validator_test_file.dart'); 19 'Compiling tests/compiler/dart2js/source_map_validator_test_file.dart');
19 Future<CompilationResult> result = entry.internalMain( 20 Future<CompilationResult> result = entry.internalMain(
20 ['tests/compiler/dart2js/source_map_validator_test_file.dart', 21 [mainFile,
21 '-o${tmpDir.path}/out.js', 22 '-o${tmpDir.path}/out.js',
22 '--library-root=sdk']); 23 '--library-root=sdk']);
23 return result.then((CompilationResult result) { 24 return result.then((CompilationResult result) {
24 Compiler compiler = result.compiler; 25 Compiler compiler = result.compiler;
25 Uri uri = 26 Uri uri =
26 new Uri.file('${tmpDir.path}/out.js', windows: Platform.isWindows); 27 new Uri.file('${tmpDir.path}/out.js', windows: Platform.isWindows);
27 validateSourceMap(uri, compiler); 28 validateSourceMap(uri,
29 mainUri: Uri.base.resolve(mainFile),
30 mainPosition: const Position(13, 1),
31 compiler: compiler);
28 32
29 print("Deleting '${tmpDir.path}'."); 33 print("Deleting '${tmpDir.path}'.");
30 tmpDir.deleteSync(recursive: true); 34 tmpDir.deleteSync(recursive: true);
31 }); 35 });
32 })); 36 }));
33 } 37 }
34 38
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698