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

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

Issue 802653005: dart2js: put all type-test related properties on the prototype and not on the constructor. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Minor improvements Created 6 years 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/deferred_emit_type_checks_test.dart
diff --git a/tests/compiler/dart2js/deferred_emit_type_checks_test.dart b/tests/compiler/dart2js/deferred_emit_type_checks_test.dart
index d397ababc0fb6e613034f3ea24123b1439db7d65..e236c691b4dee8c4ef91071503e3fe756b979819 100644
--- a/tests/compiler/dart2js/deferred_emit_type_checks_test.dart
+++ b/tests/compiler/dart2js/deferred_emit_type_checks_test.dart
@@ -53,11 +53,8 @@ void main() {
String mainOutput = outputs['main.js'].mem[0];
String deferredOutput = outputs['out_1.part.js'].mem[0];
String isPrefix = compiler.backend.namer.operatorIsPrefix;
- String escapedIsPrefix = isPrefix.replaceAll(r'$', r'\$');
- RegExp re = new RegExp(r"\n _ = .\.A;\n _."
- "${escapedIsPrefix}A = TRUE;");
- Expect.isTrue(re.hasMatch(deferredOutput));
- Expect.isFalse(re.hasMatch(mainOutput));
+ Expect.isTrue(deferredOutput.contains('${isPrefix}A: true'));
+ Expect.isFalse(mainOutput.contains('${isPrefix}A: true'));
}));
}

Powered by Google App Engine
This is Rietveld 408576698