| 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 '../../../sdk/lib/_internal/compiler/implementation/elements/elements.dar
t' | 10 import '../../../sdk/lib/_internal/compiler/implementation/elements/elements.dar
t' |
| 12 as lego; | 11 as lego; |
| 13 export '../../../sdk/lib/_internal/compiler/implementation/elements/elements.dar
t'; | 12 export '../../../sdk/lib/_internal/compiler/implementation/elements/elements.dar
t'; |
| 14 | 13 |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 final xRe = new RegExp('\\bx\\b'); | 227 final xRe = new RegExp('\\bx\\b'); |
| 229 regexp = regexp.replaceAll(xRe, '(?:$anyIdentifier)'); | 228 regexp = regexp.replaceAll(xRe, '(?:$anyIdentifier)'); |
| 230 final spaceRe = new RegExp('\\s+'); | 229 final spaceRe = new RegExp('\\s+'); |
| 231 regexp = regexp.replaceAll(spaceRe, '(?:\\s*)'); | 230 regexp = regexp.replaceAll(spaceRe, '(?:\\s*)'); |
| 232 if (shouldMatch) { | 231 if (shouldMatch) { |
| 233 Expect.isTrue(new RegExp(regexp).hasMatch(generated)); | 232 Expect.isTrue(new RegExp(regexp).hasMatch(generated)); |
| 234 } else { | 233 } else { |
| 235 Expect.isFalse(new RegExp(regexp).hasMatch(generated)); | 234 Expect.isFalse(new RegExp(regexp).hasMatch(generated)); |
| 236 } | 235 } |
| 237 } | 236 } |
| OLD | NEW |