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

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

Issue 2399913002: Remove 'initializeTestEnvironment' from 'analyzer'. (Closed)
Patch Set: Created 4 years, 2 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/test_all.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 analyzer.test.utils; 5 library analyzer.test.utils;
6 6
7 import 'package:analyzer/dart/ast/ast.dart'; 7 import 'package:analyzer/dart/ast/ast.dart';
8 import 'package:analyzer/dart/element/element.dart'; 8 import 'package:analyzer/dart/element/element.dart';
9 import 'package:analyzer/dart/element/type.dart'; 9 import 'package:analyzer/dart/element/type.dart';
10 import 'package:analyzer/src/generated/resolver.dart' show TypeProvider; 10 import 'package:analyzer/src/generated/resolver.dart' show TypeProvider;
11 import 'package:path/path.dart' as path;
12 import 'package:test/test.dart'; 11 import 'package:test/test.dart';
13 12
14 void initializeTestEnvironment([path.Context context]) {}
15
16 /** 13 /**
17 * The type of an assertion which asserts properties of [T]s. 14 * The type of an assertion which asserts properties of [T]s.
18 */ 15 */
19 typedef void Asserter<T>(T type); 16 typedef void Asserter<T>(T type);
20 17
21 /** 18 /**
22 * The type of a function which given an [S], builds an assertion over [T]s. 19 * The type of a function which given an [S], builds an assertion over [T]s.
23 */ 20 */
24 typedef Asserter<T> AsserterBuilder<S, T>(S arg); 21 typedef Asserter<T> AsserterBuilder<S, T>(S arg);
25 22
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 Asserter<DartType> isType(DartType argument) => (DartType t) { 288 Asserter<DartType> isType(DartType argument) => (DartType t) {
292 expect(t, same(argument)); 289 expect(t, same(argument));
293 }; 290 };
294 291
295 /** 292 /**
296 * Given a type, produce an assertion that a type has the same element. 293 * Given a type, produce an assertion that a type has the same element.
297 */ 294 */
298 Asserter<DartType> sameElement(DartType elementType) => 295 Asserter<DartType> sameElement(DartType elementType) =>
299 hasElement(elementType.element); 296 hasElement(elementType.element);
300 } 297 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/test_all.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698