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

Unified Diff: tests/compiler/dart2js/sourcemaps/source_mapping_operators_test.dart

Issue 1769013002: Add white-listing to sourcemap tests. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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
Index: tests/compiler/dart2js/sourcemaps/source_mapping_operators_test.dart
diff --git a/tests/compiler/dart2js/sourcemaps/source_mapping_operators_test.dart b/tests/compiler/dart2js/sourcemaps/source_mapping_operators_test.dart
index 908ef874641988987c96b878a8756492d6b3907f..3aaacce74aac52850f097c581097d9affd00fd66 100644
--- a/tests/compiler/dart2js/sourcemaps/source_mapping_operators_test.dart
+++ b/tests/compiler/dart2js/sourcemaps/source_mapping_operators_test.dart
@@ -2,8 +2,31 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-import 'source_mapping_tester.dart' as tester;
+import 'source_mapping_tester.dart';
+import 'sourcemap_helper.dart';
+import 'package:compiler/src/io/position_information.dart';
void main() {
- tester.main(['operators']);
+ test(['operators'], whiteListFunction: (String config, String file) {
+ bool allowGtOptimization(CodePoint codePoint) {
+ // Allow missing code points for bailout optimization.
+ return codePoint.jsCode.contains(r'.$gt()'); // # Issue 25304
+ }
+
+ if (config == 'cps') {
+ return (CodePoint codePoint) {
+ // Temporarily allow missing code points on expression statements.
+ if (codePoint.kind == StepKind.EXPRESSION_STATEMENT ||
+ codePoint.kind == StepKind.IF_CONDITION) {
+ return true;
+ }
+ if (codePoint.jsCode.contains(r'H.iae(')) {
+ // Allow missing code points for bailout calls.
+ return true;
+ }
+ return allowGtOptimization(codePoint);
+ };
+ }
+ return allowGtOptimization;
+ });
}

Powered by Google App Engine
This is Rietveld 408576698