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

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

Issue 609783002: Support static field access in analyzer2dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 6 years, 2 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
« no previous file with comments | « tests/compiler/dart2js/private_test.dart ('k') | tests/compiler/dart2js/type_checker_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 "package:expect/expect.dart"; 6 import "package:expect/expect.dart";
7 import "package:async_helper/async_helper.dart"; 7 import "package:async_helper/async_helper.dart";
8 import "package:compiler/implementation/dart2jslib.dart"; 8 import "package:compiler/implementation/dart2jslib.dart";
9 import 'package:compiler/implementation/source_file.dart'; 9 import 'package:compiler/implementation/source_file.dart';
10 import "mock_compiler.dart"; 10 import "mock_compiler.dart";
(...skipping 27 matching lines...) Expand all
38 } 38 }
39 }); 39 });
40 40
41 for (int i = 0; i < expectedLocations.length; ++i) { 41 for (int i = 0; i < expectedLocations.length; ++i) {
42 int expectedLocation = expectedLocations[i]; 42 int expectedLocation = expectedLocations[i];
43 if (!locations.contains(expectedLocation)) { 43 if (!locations.contains(expectedLocation)) {
44 int originalLocation = expectedLocation + i; 44 int originalLocation = expectedLocation + i;
45 SourceFile sourceFileWithMarkers = 45 SourceFile sourceFileWithMarkers =
46 new StringSourceFile('<test script>', codeWithMarkers); 46 new StringSourceFile('<test script>', codeWithMarkers);
47 String message = sourceFileWithMarkers.getLocationMessage( 47 String message = sourceFileWithMarkers.getLocationMessage(
48 'Missing location', originalLocation, originalLocation + 1, true, 48 'Missing location', originalLocation, originalLocation + 1);
49 (s) => s);
50 Expect.fail(message); 49 Expect.fail(message);
51 } 50 }
52 } 51 }
53 })); 52 }));
54 } 53 }
55 54
56 String FUNCTIONS_TEST = ''' 55 String FUNCTIONS_TEST = '''
57 @void main() { print(test(15)); @} 56 @void main() { print(test(15)); @}
58 // The 'if' has been added to avoid inlining of 'test'. 57 // The 'if' has been added to avoid inlining of 'test'.
59 @int test(int x) { if (x != null) return x; else return null; @}'''; 58 @int test(int x) { if (x != null) return x; else return null; @}''';
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 testSourceMapLocations(FUNCTIONS_TEST); 103 testSourceMapLocations(FUNCTIONS_TEST);
105 testSourceMapLocations(RETURN_TEST); 104 testSourceMapLocations(RETURN_TEST);
106 testSourceMapLocations(NOT_TEST); 105 testSourceMapLocations(NOT_TEST);
107 testSourceMapLocations(UNARY_TEST); 106 testSourceMapLocations(UNARY_TEST);
108 testSourceMapLocations(BINARY_TEST); 107 testSourceMapLocations(BINARY_TEST);
109 testSourceMapLocations(SEND_TEST); 108 testSourceMapLocations(SEND_TEST);
110 testSourceMapLocations(SEND_SET_TEST); 109 testSourceMapLocations(SEND_SET_TEST);
111 testSourceMapLocations(LOOP_TEST); 110 testSourceMapLocations(LOOP_TEST);
112 testSourceMapLocations(INTERCEPTOR_TEST); 111 testSourceMapLocations(INTERCEPTOR_TEST);
113 } 112 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/private_test.dart ('k') | tests/compiler/dart2js/type_checker_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698