Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(243)

Side by Side Diff: pkg/analyzer/test/parse_compilation_unit_test.dart

Issue 1269393002: Fix ToStringVisitor to handle external functions (issue 23968) (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pkg/analyzer/test/generated/ast_test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/generated/ast_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698