| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 // Test constant folding. | |
| 5 | 4 |
| 6 library compiler_helper; | 5 library compiler_helper; |
| 7 | 6 |
| 8 import 'dart:async'; | 7 import 'dart:async'; |
| 9 import "package:expect/expect.dart"; | 8 import "package:expect/expect.dart"; |
| 10 | 9 |
| 11 import 'package:compiler/implementation/elements/elements.dart' | 10 import 'package:compiler/implementation/elements/elements.dart' |
| 12 as lego; | 11 as lego; |
| 13 export 'package:compiler/implementation/elements/elements.dart'; | 12 export 'package:compiler/implementation/elements/elements.dart'; |
| 14 | 13 |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 regexp = regexp.replaceAll(xRe, '(?:$anyIdentifier)'); | 239 regexp = regexp.replaceAll(xRe, '(?:$anyIdentifier)'); |
| 241 final spaceRe = new RegExp('\\s+'); | 240 final spaceRe = new RegExp('\\s+'); |
| 242 regexp = regexp.replaceAll(spaceRe, '(?:\\s*)'); | 241 regexp = regexp.replaceAll(spaceRe, '(?:\\s*)'); |
| 243 if (shouldMatch) { | 242 if (shouldMatch) { |
| 244 Expect.isTrue(new RegExp(regexp).hasMatch(generated)); | 243 Expect.isTrue(new RegExp(regexp).hasMatch(generated)); |
| 245 } else { | 244 } else { |
| 246 Expect.isFalse(new RegExp(regexp).hasMatch(generated)); | 245 Expect.isFalse(new RegExp(regexp).hasMatch(generated)); |
| 247 } | 246 } |
| 248 }); | 247 }); |
| 249 } | 248 } |
| OLD | NEW |