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

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

Issue 10804024: Add source mapping info to loops. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/compiler/implementation/ssa/nodes.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/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);
}
« no previous file with comments | « lib/compiler/implementation/ssa/nodes.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698