| OLD | NEW |
| 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.generated.parser_test; | 5 library analyzer.test.generated.parser_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/standard_ast_factory.dart'; | 8 import 'package:analyzer/dart/ast/standard_ast_factory.dart'; |
| 9 import 'package:analyzer/dart/ast/token.dart'; | 9 import 'package:analyzer/dart/ast/token.dart'; |
| 10 import 'package:analyzer/dart/ast/visitor.dart'; | 10 import 'package:analyzer/dart/ast/visitor.dart'; |
| (...skipping 5329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5340 expect(binaryExpression.operator, isNotNull); | 5340 expect(binaryExpression.operator, isNotNull); |
| 5341 expect(binaryExpression.operator.type, TokenType.BAR_BAR); | 5341 expect(binaryExpression.operator.type, TokenType.BAR_BAR); |
| 5342 expect(binaryExpression.rightOperand, isNotNull); | 5342 expect(binaryExpression.rightOperand, isNotNull); |
| 5343 } | 5343 } |
| 5344 | 5344 |
| 5345 void test_parseMapLiteral_empty() { | 5345 void test_parseMapLiteral_empty() { |
| 5346 Token token = TokenFactory.tokenFromKeyword(Keyword.CONST); | 5346 Token token = TokenFactory.tokenFromKeyword(Keyword.CONST); |
| 5347 MapLiteral literal = parseMapLiteral(token, '<String, int>', '{}'); | 5347 MapLiteral literal = parseMapLiteral(token, '<String, int>', '{}'); |
| 5348 expect(literal, isNotNull); | 5348 expect(literal, isNotNull); |
| 5349 assertNoErrors(); | 5349 assertNoErrors(); |
| 5350 expect(literal.constKeyword, token); | 5350 expect(literal.constKeyword.keyword, Keyword.CONST); |
| 5351 expect(literal.typeArguments, isNotNull); | 5351 expect(literal.typeArguments, isNotNull); |
| 5352 expect(literal.leftBracket, isNotNull); | 5352 expect(literal.leftBracket, isNotNull); |
| 5353 expect(literal.entries, hasLength(0)); | 5353 expect(literal.entries, hasLength(0)); |
| 5354 expect(literal.rightBracket, isNotNull); | 5354 expect(literal.rightBracket, isNotNull); |
| 5355 } | 5355 } |
| 5356 | 5356 |
| 5357 void test_parseMapLiteral_multiple() { | 5357 void test_parseMapLiteral_multiple() { |
| 5358 MapLiteral literal = parseMapLiteral(null, null, "{'a' : b, 'x' : y}"); | 5358 MapLiteral literal = parseMapLiteral(null, null, "{'a' : b, 'x' : y}"); |
| 5359 expect(literal, isNotNull); | 5359 expect(literal, isNotNull); |
| 5360 assertNoErrors(); | 5360 assertNoErrors(); |
| (...skipping 9215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14576 expect(typeAlias.name, isNotNull); | 14576 expect(typeAlias.name, isNotNull); |
| 14577 expect(typeAlias.typeParameters, isNull); | 14577 expect(typeAlias.typeParameters, isNull); |
| 14578 expect(typeAlias.semicolon, isNotNull); | 14578 expect(typeAlias.semicolon, isNotNull); |
| 14579 GenericFunctionType functionType = typeAlias.functionType; | 14579 GenericFunctionType functionType = typeAlias.functionType; |
| 14580 expect(functionType, isNotNull); | 14580 expect(functionType, isNotNull); |
| 14581 expect(functionType.parameters, isNotNull); | 14581 expect(functionType.parameters, isNotNull); |
| 14582 expect(functionType.returnType, isNotNull); | 14582 expect(functionType.returnType, isNotNull); |
| 14583 expect(functionType.typeParameters, isNull); | 14583 expect(functionType.typeParameters, isNull); |
| 14584 } | 14584 } |
| 14585 } | 14585 } |
| OLD | NEW |