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

Side by Side Diff: pkg/analysis_server/test/services/completion/local_computer_test.dart

Issue 879093002: Fix mixin resolution order when multiple mixins present. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 11 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 | Annotate | Revision Log
OLDNEW
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 test.services.completion.dart.local; 5 library test.services.completion.dart.local;
6 6
7 import 'package:analysis_server/src/protocol_server.dart'; 7 import 'package:analysis_server/src/protocol_server.dart';
8 import 'package:analysis_server/src/services/completion/dart_completion_manager. dart'; 8 import 'package:analysis_server/src/services/completion/dart_completion_manager. dart';
9 import 'package:analysis_server/src/services/completion/local_computer.dart'; 9 import 'package:analysis_server/src/services/completion/local_computer.dart';
10 import 'package:unittest/unittest.dart'; 10 import 'package:unittest/unittest.dart';
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 String declaringType, String returnType, {int relevance: 54 String declaringType, String returnType, {int relevance:
55 COMPLETION_RELEVANCE_DEFAULT, bool isDeprecated: false}) { 55 COMPLETION_RELEVANCE_DEFAULT, bool isDeprecated: false}) {
56 return assertSuggestMethod( 56 return assertSuggestMethod(
57 name, 57 name,
58 declaringType, 58 declaringType,
59 returnType, 59 returnType,
60 relevance: relevance, 60 relevance: relevance,
61 isDeprecated: isDeprecated); 61 isDeprecated: isDeprecated);
62 } 62 }
63 63
64 fail_mixin_ordering() {
65 // TODO(paulberry): Duplicates aren't being removed, so we see both M1.m()
66 // and M2.m().
67 addTestSource('''
68 class B {}
69 class M1 {
70 void m() {}
71 }
72 class M2 {
73 void m() {}
74 }
75 class C extends B with M1, M2 {
76 void f() {
77 ^
78 }
79 }
80 ''');
81 expect(computeFast(), isTrue);
82 assertSuggestMethod('m', 'M2', 'void');
83 }
84
64 @override 85 @override
65 void setUpComputer() { 86 void setUpComputer() {
66 computer = new LocalComputer(); 87 computer = new LocalComputer();
67 } 88 }
68 89
69 test_break_ignores_outer_functions_using_closure() { 90 test_break_ignores_outer_functions_using_closure() {
70 addTestSource(''' 91 addTestSource('''
71 void main() { 92 void main() {
72 foo: while (true) { 93 foo: while (true) {
73 var f = () { 94 var f = () {
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 CompletionSuggestion suggestion = assertSuggestMethod('m', 'A', 'void'); 580 CompletionSuggestion suggestion = assertSuggestMethod('m', 'A', 'void');
560 expect(suggestion.parameterNames, hasLength(2)); 581 expect(suggestion.parameterNames, hasLength(2));
561 expect(suggestion.parameterNames[0], 'x'); 582 expect(suggestion.parameterNames[0], 'x');
562 expect(suggestion.parameterTypes[0], 'dynamic'); 583 expect(suggestion.parameterTypes[0], 'dynamic');
563 expect(suggestion.parameterNames[1], 'y'); 584 expect(suggestion.parameterNames[1], 'y');
564 expect(suggestion.parameterTypes[1], 'int'); 585 expect(suggestion.parameterTypes[1], 'int');
565 expect(suggestion.requiredParameterCount, 2); 586 expect(suggestion.requiredParameterCount, 2);
566 expect(suggestion.hasNamedParameters, false); 587 expect(suggestion.hasNamedParameters, false);
567 } 588 }
568 } 589 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/test/services/completion/imported_computer_test.dart ('k') | pkg/analyzer/lib/src/generated/element.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698