| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 that parameters keep their names in the output. | 4 // Test that parameters keep their names in the output. |
| 5 | 5 |
| 6 import 'package:async_helper/async_helper.dart'; | 6 import 'package:async_helper/async_helper.dart'; |
| 7 import 'package:expect/expect.dart'; | 7 import 'package:expect/expect.dart'; |
| 8 import 'compiler_helper.dart'; | 8 import 'compiler_helper.dart'; |
| 9 | 9 |
| 10 main() { | 10 main() { |
| 11 var buffer = new StringBuffer(); | 11 var buffer = new StringBuffer(); |
| 12 buffer.write("var foo("); | 12 buffer.write("foo("); |
| 13 for (int i = 0; i < 2000; i++) { | 13 for (int i = 0; i < 2000; i++) { |
| 14 buffer.write("x$i, "); | 14 buffer.write("x$i, "); |
| 15 } | 15 } |
| 16 buffer.write("x) { int i = "); | 16 buffer.write("x) { int i = "); |
| 17 for (int i = 0; i < 2000; i++) { | 17 for (int i = 0; i < 2000; i++) { |
| 18 buffer.write("x$i+"); | 18 buffer.write("x$i+"); |
| 19 } | 19 } |
| 20 buffer.write("2000; return i; }"); | 20 buffer.write("2000; return i; }"); |
| 21 String code = buffer.toString(); | 21 String code = buffer.toString(); |
| 22 | 22 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 37 re = new RegExp(r"z8,z9,aa0,aa1,aa2"); | 37 re = new RegExp(r"z8,z9,aa0,aa1,aa2"); |
| 38 Expect.isTrue(re.hasMatch(generated)); | 38 Expect.isTrue(re.hasMatch(generated)); |
| 39 | 39 |
| 40 re = new RegExp(r"aa9,ab0,ab1"); | 40 re = new RegExp(r"aa9,ab0,ab1"); |
| 41 Expect.isTrue(re.hasMatch(generated)); | 41 Expect.isTrue(re.hasMatch(generated)); |
| 42 | 42 |
| 43 re = new RegExp(r"az9,ba0,ba1"); | 43 re = new RegExp(r"az9,ba0,ba1"); |
| 44 Expect.isTrue(re.hasMatch(generated)); | 44 Expect.isTrue(re.hasMatch(generated)); |
| 45 })); | 45 })); |
| 46 } | 46 } |
| OLD | NEW |