| 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 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/ast/standard_resolution_map.dart'; | 8 import 'package:analyzer/dart/ast/standard_resolution_map.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'; |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 * Primitive assertion for the list type | 222 * Primitive assertion for the list type |
| 223 */ | 223 */ |
| 224 Asserter<DartType> get isList => hasElementOf(_typeProvider.listType); | 224 Asserter<DartType> get isList => hasElementOf(_typeProvider.listType); |
| 225 | 225 |
| 226 /** | 226 /** |
| 227 * Primitive assertion for the map type | 227 * Primitive assertion for the map type |
| 228 */ | 228 */ |
| 229 Asserter<DartType> get isMap => hasElementOf(_typeProvider.mapType); | 229 Asserter<DartType> get isMap => hasElementOf(_typeProvider.mapType); |
| 230 | 230 |
| 231 /** | 231 /** |
| 232 * Primitive assertion for the Null type |
| 233 */ |
| 234 Asserter<DartType> get isNull => isType(_typeProvider.nullType); |
| 235 |
| 236 /** |
| 232 * Primitive assertion for the num type | 237 * Primitive assertion for the num type |
| 233 */ | 238 */ |
| 234 Asserter<DartType> get isNum => isType(_typeProvider.numType); | 239 Asserter<DartType> get isNum => isType(_typeProvider.numType); |
| 235 | 240 |
| 236 /** | 241 /** |
| 237 * Primitive assertion for the Object type | 242 * Primitive assertion for the Object type |
| 238 */ | 243 */ |
| 239 Asserter<DartType> get isObject => isType(_typeProvider.objectType); | 244 Asserter<DartType> get isObject => isType(_typeProvider.objectType); |
| 240 | 245 |
| 241 /** | 246 /** |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 Asserter<DartType> argAssert0, Asserter<DartType> argAssert1) => | 303 Asserter<DartType> argAssert0, Asserter<DartType> argAssert1) => |
| 299 isInstantiationOf(isMap)([argAssert0, argAssert1]); | 304 isInstantiationOf(isMap)([argAssert0, argAssert1]); |
| 300 | 305 |
| 301 /** | 306 /** |
| 302 * Assert that a type is equal to the [expected]. | 307 * Assert that a type is equal to the [expected]. |
| 303 */ | 308 */ |
| 304 Asserter<DartType> isType(DartType expected) => (DartType t) { | 309 Asserter<DartType> isType(DartType expected) => (DartType t) { |
| 305 expect(t, expected); | 310 expect(t, expected); |
| 306 }; | 311 }; |
| 307 } | 312 } |
| OLD | NEW |