| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 library test.parse.compilation.unit; | 5 library test.parse.compilation.unit; |
| 6 | 6 |
| 7 import 'package:analyzer/analyzer.dart'; | 7 import 'package:analyzer/analyzer.dart'; |
| 8 import 'package:unittest/unittest.dart'; | 8 import 'package:unittest/unittest.dart'; |
| 9 | 9 |
| 10 void main() { | 10 void main() { |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 return error is AnalyzerErrorGroup && | 30 return error is AnalyzerErrorGroup && |
| 31 error | 31 error |
| 32 .toString() | 32 .toString() |
| 33 .contains("Error in <unknown source>: Expected to find ';'"); | 33 .contains("Error in <unknown source>: Expected to find ';'"); |
| 34 }))); | 34 }))); |
| 35 }); | 35 }); |
| 36 | 36 |
| 37 test("allows you to specify whether or not to parse function bodies", () { | 37 test("allows you to specify whether or not to parse function bodies", () { |
| 38 var unit = parseCompilationUnit("void main() => print('Hello, world!');", | 38 var unit = parseCompilationUnit("void main() => print('Hello, world!');", |
| 39 parseFunctionBodies: false); | 39 parseFunctionBodies: false); |
| 40 expect(unit.toString(), equals("void main() ;")); | 40 expect(unit.toString(), equals("void main();")); |
| 41 }); | 41 }); |
| 42 } | 42 } |
| OLD | NEW |