| Index: tests/compiler/dart2js/source_mapping_test.dart
|
| diff --git a/tests/compiler/dart2js/source_mapping_test.dart b/tests/compiler/dart2js/source_mapping_test.dart
|
| index 34140cfdad06a616473e87872d97d1997dee7a0c..d8ed23eb24c2054e50670caa9cbacb08176eec50 100644
|
| --- a/tests/compiler/dart2js/source_mapping_test.dart
|
| +++ b/tests/compiler/dart2js/source_mapping_test.dart
|
| @@ -73,6 +73,15 @@ void staticSend(x) { print(x); }
|
| class NewSend { void dynamicSend(x) { print(x); } }
|
| ''';
|
|
|
| +String LOOP_TEST = '''
|
| +void main() {
|
| + @for (int i = 0; i < 100; ++i) { print(test(13)); @}
|
| +}
|
| +int test(int x) {
|
| + int result = 1; @while (result < x) { result <<= 1; @} return result;
|
| +}''';
|
| +
|
| +
|
| main() {
|
| // These tests are fragile, since mappings for specific source locations
|
| // could disappear due to various optimizations like code elimination,
|
| @@ -85,4 +94,5 @@ main() {
|
| testSourceMapLocations(UNARY_TEST);
|
| testSourceMapLocations(BINARY_TEST);
|
| testSourceMapLocations(SEND_TEST);
|
| + testSourceMapLocations(LOOP_TEST);
|
| }
|
|
|