| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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.src.summary.summary_common; | 5 library analyzer.test.src.summary.summary_common; |
| 6 | 6 |
| 7 import 'package:analyzer/analyzer.dart'; | 7 import 'package:analyzer/analyzer.dart'; |
| 8 import 'package:analyzer/dart/ast/ast.dart'; | 8 import 'package:analyzer/dart/ast/ast.dart'; |
| 9 import 'package:analyzer/dart/element/element.dart'; | 9 import 'package:analyzer/dart/element/element.dart'; |
| 10 import 'package:analyzer/src/generated/engine.dart'; | 10 import 'package:analyzer/src/generated/engine.dart'; |
| (...skipping 2543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2554 expect(executable.isConst, false); | 2554 expect(executable.isConst, false); |
| 2555 expect(executable.isFactory, false); | 2555 expect(executable.isFactory, false); |
| 2556 expect(executable.isStatic, false); | 2556 expect(executable.isStatic, false); |
| 2557 expect(executable.parameters, hasLength(1)); | 2557 expect(executable.parameters, hasLength(1)); |
| 2558 checkTypeRef(executable.returnType, null, null, 'C'); | 2558 checkTypeRef(executable.returnType, null, null, 'C'); |
| 2559 expect(executable.typeParameters, isEmpty); | 2559 expect(executable.typeParameters, isEmpty); |
| 2560 expect(executable.isExternal, false); | 2560 expect(executable.isExternal, false); |
| 2561 } | 2561 } |
| 2562 | 2562 |
| 2563 test_executable_operator_equal() { | 2563 test_executable_operator_equal() { |
| 2564 UnlinkedExecutable executable = | 2564 UnlinkedExecutable executable = serializeClassText( |
| 2565 serializeClassText('class C { bool operator==(C other) => false; }') | 2565 'class C { bool operator==(Object other) => false; }').executables[0]; |
| 2566 .executables[0]; | |
| 2567 expect(executable.name, '=='); | 2566 expect(executable.name, '=='); |
| 2568 } | 2567 } |
| 2569 | 2568 |
| 2570 test_executable_operator_external() { | 2569 test_executable_operator_external() { |
| 2571 UnlinkedExecutable executable = | 2570 UnlinkedExecutable executable = |
| 2572 serializeClassText('class C { external C operator+(C c); }') | 2571 serializeClassText('class C { external C operator+(C c); }') |
| 2573 .executables[0]; | 2572 .executables[0]; |
| 2574 expect(executable.isExternal, true); | 2573 expect(executable.isExternal, true); |
| 2575 } | 2574 } |
| 2576 | 2575 |
| (...skipping 1649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4226 expect(constExpr.operations, operators); | 4225 expect(constExpr.operations, operators); |
| 4227 expect(constExpr.ints, ints); | 4226 expect(constExpr.ints, ints); |
| 4228 expect(constExpr.doubles, doubles); | 4227 expect(constExpr.doubles, doubles); |
| 4229 expect(constExpr.strings, strings); | 4228 expect(constExpr.strings, strings); |
| 4230 expect(constExpr.references, hasLength(referenceValidators.length)); | 4229 expect(constExpr.references, hasLength(referenceValidators.length)); |
| 4231 for (int i = 0; i < referenceValidators.length; i++) { | 4230 for (int i = 0; i < referenceValidators.length; i++) { |
| 4232 referenceValidators[i](constExpr.references[i]); | 4231 referenceValidators[i](constExpr.references[i]); |
| 4233 } | 4232 } |
| 4234 } | 4233 } |
| 4235 } | 4234 } |
| OLD | NEW |