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

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

Issue 2391423003: Switch 'analyzer' to 'package:test' and test_reflective_loader ^0.1.0. (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; 11 import 'package:path/path.dart' as path;
12 import 'package:unittest/unittest.dart'; 12 import 'package:test/test.dart';
13 13
14 void initializeTestEnvironment([path.Context context]) { 14 void initializeTestEnvironment([path.Context context]) {}
Paul Berry 2016/10/06 03:01:03 Since this function doesn't do anything anymore, c
15 groupSep = ' | ';
16 }
17 15
18 /** 16 /**
19 * The type of an assertion which asserts properties of [T]s. 17 * The type of an assertion which asserts properties of [T]s.
20 */ 18 */
21 typedef void Asserter<T>(T type); 19 typedef void Asserter<T>(T type);
22 20
23 /** 21 /**
24 * The type of a function which given an [S], builds an assertion over [T]s. 22 * The type of a function which given an [S], builds an assertion over [T]s.
25 */ 23 */
26 typedef Asserter<T> AsserterBuilder<S, T>(S arg); 24 typedef Asserter<T> AsserterBuilder<S, T>(S arg);
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 Asserter<DartType> isType(DartType argument) => (DartType t) { 291 Asserter<DartType> isType(DartType argument) => (DartType t) {
294 expect(t, same(argument)); 292 expect(t, same(argument));
295 }; 293 };
296 294
297 /** 295 /**
298 * Given a type, produce an assertion that a type has the same element. 296 * Given a type, produce an assertion that a type has the same element.
299 */ 297 */
300 Asserter<DartType> sameElement(DartType elementType) => 298 Asserter<DartType> sameElement(DartType elementType) =>
301 hasElement(elementType.element); 299 hasElement(elementType.element);
302 } 300 }
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