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

Unified Diff: frog/tests/leg/src/ConstantFoldingTest.dart

Issue 9592009: Reapply "Refactor constant part." (r4958) with fixes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update tests and fix code after renaming. Created 8 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: frog/tests/leg/src/ConstantFoldingTest.dart
diff --git a/frog/tests/leg/src/ConstantFoldingTest.dart b/frog/tests/leg/src/ConstantFoldingTest.dart
index aabc92c51e0d194c4b1ecf88eb607666f71e096d..b8faaf35bcf27df493f2dc41ffbf1b9091274556 100644
--- a/frog/tests/leg/src/ConstantFoldingTest.dart
+++ b/frog/tests/leg/src/ConstantFoldingTest.dart
@@ -38,9 +38,9 @@ void compileAndTest(String code, String entry, RegExp regexp) {
main() {
compileAndTest(
- NUMBER_FOLDING, 'main', const RegExp(@"print\$1\(7\)"));
+ NUMBER_FOLDING, 'main', const RegExp(@"print\$1\(\(7\)\)"));
compileAndTest(
- NEGATIVE_NUMBER_FOLDING, 'main', const RegExp(@"print\$1\(1\)"));
+ NEGATIVE_NUMBER_FOLDING, 'main', const RegExp(@"print\$1\(\(1\)\)"));
String generated = compile(NULL_EQUALS_FOLDING, 'foo');
RegExp regexp = const RegExp(@'eqNull\$1\(a\)');
@@ -49,7 +49,7 @@ main() {
regexp = const RegExp(@'\(?void 0\)? === b');
Expect.isTrue(regexp.hasMatch(generated));
- regexp = const RegExp('4 === c');
+ regexp = const RegExp(@'\(4\) === c');
Expect.isTrue(regexp.hasMatch(generated));
regexp = const RegExp("'foo' === d");

Powered by Google App Engine
This is Rietveld 408576698