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

Side by Side Diff: pkg/analysis_server/test/analysis/notification_highlights_test.dart

Issue 612123002: Fix for highlighting 'abstract' in ClassTypeAlias. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 2 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
« no previous file with comments | « pkg/analysis_server/lib/src/computer/computer_highlights.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.analysis.notification.highlights; 5 library test.analysis.notification.highlights;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_server/src/constants.dart'; 9 import 'package:analysis_server/src/constants.dart';
10 import 'package:analysis_server/src/protocol.dart'; 10 import 'package:analysis_server/src/protocol.dart';
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 @AAA main() {} 129 @AAA main() {}
130 '''); 130 ''');
131 return prepareHighlights().then((_) { 131 return prepareHighlights().then((_) {
132 assertHasRegion(HighlightRegionType.ANNOTATION, '@AAA'); 132 assertHasRegion(HighlightRegionType.ANNOTATION, '@AAA');
133 }); 133 });
134 } 134 }
135 135
136 test_BUILT_IN_abstract() { 136 test_BUILT_IN_abstract() {
137 addTestFile(''' 137 addTestFile('''
138 abstract class A {}; 138 abstract class A {};
139 abstract class B = Object with A;
139 main() { 140 main() {
140 var abstract = 42; 141 var abstract = 42;
141 }'''); 142 }''');
142 return prepareHighlights().then((_) { 143 return prepareHighlights().then((_) {
143 assertHasRegion(HighlightRegionType.BUILT_IN, 'abstract class'); 144 assertHasRegion(HighlightRegionType.BUILT_IN, 'abstract class A');
145 assertHasRegion(HighlightRegionType.BUILT_IN, 'abstract class B');
144 assertNoRegion(HighlightRegionType.BUILT_IN, 'abstract = 42'); 146 assertNoRegion(HighlightRegionType.BUILT_IN, 'abstract = 42');
145 }); 147 });
146 } 148 }
147 149
148 test_BUILT_IN_as() { 150 test_BUILT_IN_as() {
149 addTestFile(''' 151 addTestFile('''
150 import 'dart:math' as math; 152 import 'dart:math' as math;
151 main() { 153 main() {
152 p as int; 154 p as int;
153 var as = 42; 155 var as = 42;
(...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after
932 void test_toString() { 934 void test_toString() {
933 expect(HighlightRegionType.CLASS.toString(), 'HighlightRegionType.CLASS'); 935 expect(HighlightRegionType.CLASS.toString(), 'HighlightRegionType.CLASS');
934 } 936 }
935 937
936 void test_valueOf_unknown() { 938 void test_valueOf_unknown() {
937 expect(() { 939 expect(() {
938 new HighlightRegionType('no-such-type'); 940 new HighlightRegionType('no-such-type');
939 }, throws); 941 }, throws);
940 } 942 }
941 } 943 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/computer/computer_highlights.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698