Index: tests/compiler/dart2js/type_guard_unuser_test.dart |
diff --git a/tests/compiler/dart2js/type_guard_unuser_test.dart b/tests/compiler/dart2js/type_guard_unuser_test.dart |
index a6703b9e9824940631add1e38ab2a01baf5fc8b4..e2e100e754e1a8b12f4842c4298832812270946a 100644 |
--- a/tests/compiler/dart2js/type_guard_unuser_test.dart |
+++ b/tests/compiler/dart2js/type_guard_unuser_test.dart |
@@ -15,7 +15,6 @@ foo(a) { |
} |
"""; |
- |
const String TEST_TWO = r""" |
bar(a) {} |
foo(d) { |
@@ -44,30 +43,30 @@ foo(int a, int b) { |
main() { |
asyncTest(() => Future.wait([ |
- compile(TEST_ONE, entry: 'foo', check: (String generated) { |
- RegExp regexp = new RegExp(getIntTypeCheck(anyIdentifier)); |
- Iterator<Match> matches = regexp.allMatches(generated).iterator; |
- checkNumberOfMatches(matches, 0); |
- Expect.isTrue( |
- generated.contains( |
+ compile(TEST_ONE, entry: 'foo', check: (String generated) { |
+ RegExp regexp = new RegExp(getIntTypeCheck(anyIdentifier)); |
+ Iterator<Match> matches = regexp.allMatches(generated).iterator; |
+ checkNumberOfMatches(matches, 0); |
+ Expect.isTrue(generated.contains( |
new RegExp(r'return a === true \? [$A-Z]+\.foo\(2\) : b;'))); |
- }), |
- compile(TEST_TWO, entry: 'foo', check: (String generated) { |
- RegExp regexp = new RegExp("foo\\(1\\)"); |
- Iterator<Match> matches = regexp.allMatches(generated).iterator; |
- checkNumberOfMatches(matches, 1); |
- }), |
- compile(TEST_THREE, entry: 'foo', check: (String generated) { |
- RegExp regexp = new RegExp(getNumberTypeCheck('a')); |
- Expect.isTrue(regexp.hasMatch(generated)); |
- regexp = new RegExp(getNumberTypeCheck('b')); |
- Expect.isTrue(regexp.hasMatch(generated)); |
- }), |
- compile(TEST_THREE_WITH_BAILOUT, entry: 'foo', check: (String generated) { |
- RegExp regexp = new RegExp(getNumberTypeCheck('a')); |
- Expect.isTrue(regexp.hasMatch(generated)); |
- regexp = new RegExp(getNumberTypeCheck('b')); |
- Expect.isTrue(regexp.hasMatch(generated)); |
- }) |
- ])); |
+ }), |
+ compile(TEST_TWO, entry: 'foo', check: (String generated) { |
+ RegExp regexp = new RegExp("foo\\(1\\)"); |
+ Iterator<Match> matches = regexp.allMatches(generated).iterator; |
+ checkNumberOfMatches(matches, 1); |
+ }), |
+ compile(TEST_THREE, entry: 'foo', check: (String generated) { |
+ RegExp regexp = new RegExp(getNumberTypeCheck('a')); |
+ Expect.isTrue(regexp.hasMatch(generated)); |
+ regexp = new RegExp(getNumberTypeCheck('b')); |
+ Expect.isTrue(regexp.hasMatch(generated)); |
+ }), |
+ compile(TEST_THREE_WITH_BAILOUT, entry: 'foo', |
+ check: (String generated) { |
+ RegExp regexp = new RegExp(getNumberTypeCheck('a')); |
+ Expect.isTrue(regexp.hasMatch(generated)); |
+ regexp = new RegExp(getNumberTypeCheck('b')); |
+ Expect.isTrue(regexp.hasMatch(generated)); |
+ }) |
+ ])); |
} |