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

Side by Side Diff: pkg/analyzer/test/src/dart/ast/utilities_test.dart

Issue 2314403008: Remove PrintWriter and PrintStringWriter from java_core. (Closed)
Patch Set: remove _printf Created 4 years, 3 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/lib/src/generated/java_core.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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 analyzer.test.src.dart.ast.utilities_test; 5 library analyzer.test.src.dart.ast.utilities_test;
6 6
7 import 'package:analyzer/dart/ast/ast.dart'; 7 import 'package:analyzer/dart/ast/ast.dart';
8 import 'package:analyzer/dart/ast/token.dart'; 8 import 'package:analyzer/dart/ast/token.dart';
9 import 'package:analyzer/dart/element/element.dart'; 9 import 'package:analyzer/dart/element/element.dart';
10 import 'package:analyzer/dart/element/type.dart'; 10 import 'package:analyzer/dart/element/type.dart';
11 import 'package:analyzer/src/dart/ast/utilities.dart'; 11 import 'package:analyzer/src/dart/ast/utilities.dart';
12 import 'package:analyzer/src/dart/element/element.dart'; 12 import 'package:analyzer/src/dart/element/element.dart';
13 import 'package:analyzer/src/generated/java_core.dart';
14 import 'package:analyzer/src/generated/java_engine.dart' show Predicate; 13 import 'package:analyzer/src/generated/java_engine.dart' show Predicate;
15 import 'package:analyzer/src/generated/java_engine.dart'; 14 import 'package:analyzer/src/generated/java_engine.dart';
16 import 'package:analyzer/src/generated/testing/ast_factory.dart'; 15 import 'package:analyzer/src/generated/testing/ast_factory.dart';
17 import 'package:analyzer/src/generated/testing/element_factory.dart'; 16 import 'package:analyzer/src/generated/testing/element_factory.dart';
18 import 'package:analyzer/src/generated/testing/token_factory.dart'; 17 import 'package:analyzer/src/generated/testing/token_factory.dart';
19 import 'package:test_reflective_loader/test_reflective_loader.dart'; 18 import 'package:test_reflective_loader/test_reflective_loader.dart';
20 import 'package:unittest/unittest.dart'; 19 import 'package:unittest/unittest.dart';
21 20
22 import '../../../generated/parser_test.dart' show ParserTestCase; 21 import '../../../generated/parser_test.dart' show ParserTestCase;
23 import '../../../generated/test_support.dart'; 22 import '../../../generated/test_support.dart';
(...skipping 3310 matching lines...) Expand 10 before | Expand all | Expand 10 after
3334 3333
3335 /** 3334 /**
3336 * Assert that a `ToSourceVisitor` will produce the expected source when visit ing the given 3335 * Assert that a `ToSourceVisitor` will produce the expected source when visit ing the given
3337 * node. 3336 * node.
3338 * 3337 *
3339 * @param expectedSource the source string that the visitor is expected to pro duce 3338 * @param expectedSource the source string that the visitor is expected to pro duce
3340 * @param node the AST node being visited to produce the actual source 3339 * @param node the AST node being visited to produce the actual source
3341 * @throws AFE if the visitor does not produce the expected source for the giv en node 3340 * @throws AFE if the visitor does not produce the expected source for the giv en node
3342 */ 3341 */
3343 void _assertSource(String expectedSource, AstNode node) { 3342 void _assertSource(String expectedSource, AstNode node) {
3344 PrintStringWriter writer = new PrintStringWriter(); 3343 StringBuffer buffer = new StringBuffer();
3345 node.accept(new ToSourceVisitor(writer)); 3344 node.accept(new ToSourceVisitor(buffer));
3346 expect(writer.toString(), expectedSource); 3345 expect(buffer.toString(), expectedSource);
3347 } 3346 }
3348 } 3347 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/java_core.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698