| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 | 4 |
| 5 import "dart:convert" show LineSplitter; | 5 import "dart:convert" show LineSplitter; |
| 6 | 6 |
| 7 import "package:expect/expect.dart"; | 7 import "package:expect/expect.dart"; |
| 8 | 8 |
| 9 void main() { | 9 void main() { |
| 10 var st0; | 10 var st0; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 } | 27 } |
| 28 | 28 |
| 29 String findMain(StackTrace stack) { | 29 String findMain(StackTrace stack) { |
| 30 var string = "$stack"; | 30 var string = "$stack"; |
| 31 var lines = LineSplitter.split(string).toList(); | 31 var lines = LineSplitter.split(string).toList(); |
| 32 while (lines.isNotEmpty && !lines.first.contains("main")) { | 32 while (lines.isNotEmpty && !lines.first.contains("main")) { |
| 33 lines.removeAt(0); | 33 lines.removeAt(0); |
| 34 } | 34 } |
| 35 return lines.join("\n"); | 35 return lines.join("\n"); |
| 36 } | 36 } |
| OLD | NEW |