| 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 // This code was auto-generated, is not intended to be edited, and is subject to | 5 // This code was auto-generated, is not intended to be edited, and is subject to |
| 6 // significant change. Please see the README file for more information. | 6 // significant change. Please see the README file for more information. |
| 7 | 7 |
| 8 library engine.ast_test; | 8 library engine.ast_test; |
| 9 | 9 |
| 10 import 'package:analyzer/src/generated/ast.dart'; | 10 import 'package:analyzer/src/generated/ast.dart'; |
| (...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 515 expect(value as double, -42.3); | 515 expect(value as double, -42.3); |
| 516 } | 516 } |
| 517 | 517 |
| 518 void test_unary_negated_integer() { | 518 void test_unary_negated_integer() { |
| 519 Object value = _getConstantValue("-42"); | 519 Object value = _getConstantValue("-42"); |
| 520 EngineTestCase.assertInstanceOf((obj) => obj is int, int, value); | 520 EngineTestCase.assertInstanceOf((obj) => obj is int, int, value); |
| 521 expect(value as int, -42); | 521 expect(value as int, -42); |
| 522 } | 522 } |
| 523 | 523 |
| 524 Object _getConstantValue(String source) => | 524 Object _getConstantValue(String source) => |
| 525 ParserTestCase.parseExpression(source).accept(new ConstantEvaluator()); | 525 parseExpression(source).accept(new ConstantEvaluator()); |
| 526 } | 526 } |
| 527 | 527 |
| 528 @reflectiveTest | 528 @reflectiveTest |
| 529 class ConstructorDeclarationTest extends EngineTestCase { | 529 class ConstructorDeclarationTest extends EngineTestCase { |
| 530 void test_firstTokenAfterCommentAndMetadata_all_inverted() { | 530 void test_firstTokenAfterCommentAndMetadata_all_inverted() { |
| 531 Token externalKeyword = TokenFactory.tokenFromKeyword(Keyword.EXTERNAL); | 531 Token externalKeyword = TokenFactory.tokenFromKeyword(Keyword.EXTERNAL); |
| 532 externalKeyword.offset = 14; | 532 externalKeyword.offset = 14; |
| 533 ConstructorDeclaration declaration = AstFactory.constructorDeclaration2( | 533 ConstructorDeclaration declaration = AstFactory.constructorDeclaration2( |
| 534 Keyword.CONST, Keyword.FACTORY, AstFactory.identifier3('int'), null, | 534 Keyword.CONST, Keyword.FACTORY, AstFactory.identifier3('int'), null, |
| 535 null, null, null); | 535 null, null, null); |
| (...skipping 2703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3239 static const List<WrapperKind> values = const [ | 3239 static const List<WrapperKind> values = const [ |
| 3240 PREFIXED_LEFT, | 3240 PREFIXED_LEFT, |
| 3241 PREFIXED_RIGHT, | 3241 PREFIXED_RIGHT, |
| 3242 PROPERTY_LEFT, | 3242 PROPERTY_LEFT, |
| 3243 PROPERTY_RIGHT, | 3243 PROPERTY_RIGHT, |
| 3244 NONE | 3244 NONE |
| 3245 ]; | 3245 ]; |
| 3246 | 3246 |
| 3247 const WrapperKind(String name, int ordinal) : super(name, ordinal); | 3247 const WrapperKind(String name, int ordinal) : super(name, ordinal); |
| 3248 } | 3248 } |
| OLD | NEW |