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

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

Issue 2975253002: Format analyzer, analysis_server, analyzer_plugin, front_end and kernel with the latest dartfmt. (Closed)
Patch Set: Created 3 years, 5 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
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 import 'dart:async'; 5 import 'dart:async';
6 6
7 import 'package:analysis_server/protocol/protocol.dart'; 7 import 'package:analysis_server/protocol/protocol.dart';
8 import 'package:analysis_server/protocol/protocol_constants.dart'; 8 import 'package:analysis_server/protocol/protocol_constants.dart';
9 import 'package:analysis_server/protocol/protocol_generated.dart'; 9 import 'package:analysis_server/protocol/protocol_generated.dart';
10 import 'package:analyzer_plugin/protocol/protocol_common.dart'; 10 import 'package:analyzer_plugin/protocol/protocol_common.dart';
(...skipping 916 matching lines...) Expand 10 before | Expand all | Expand 10 after
927 } 927 }
928 '''); 928 ''');
929 await prepareHighlights(); 929 await prepareHighlights();
930 assertHasRegion(HighlightRegionType.TYPE_PARAMETER, 'T> {'); 930 assertHasRegion(HighlightRegionType.TYPE_PARAMETER, 'T> {');
931 assertHasRegion(HighlightRegionType.TYPE_PARAMETER, 'T fff;'); 931 assertHasRegion(HighlightRegionType.TYPE_PARAMETER, 'T fff;');
932 assertHasRegion(HighlightRegionType.TYPE_PARAMETER, 'T mmm('); 932 assertHasRegion(HighlightRegionType.TYPE_PARAMETER, 'T mmm(');
933 assertHasRegion(HighlightRegionType.TYPE_PARAMETER, 'T p)'); 933 assertHasRegion(HighlightRegionType.TYPE_PARAMETER, 'T p)');
934 } 934 }
935 935
936 void _addLibraryForTestPart() { 936 void _addLibraryForTestPart() {
937 addFile( 937 addFile('$testFolder/my_lib.dart', '''
938 '$testFolder/my_lib.dart',
939 '''
940 library lib; 938 library lib;
941 part 'test.dart'; 939 part 'test.dart';
942 '''); 940 ''');
943 } 941 }
944 } 942 }
945 943
946 @reflectiveTest 944 @reflectiveTest
947 class HighlightTypeTest { 945 class HighlightTypeTest {
948 void test_constructor() { 946 void test_constructor() {
949 expect(HighlightRegionType.CLASS, 947 expect(HighlightRegionType.CLASS,
950 new HighlightRegionType(HighlightRegionType.CLASS.name)); 948 new HighlightRegionType(HighlightRegionType.CLASS.name));
951 } 949 }
952 950
953 void test_toString() { 951 void test_toString() {
954 expect(HighlightRegionType.CLASS.toString(), 'HighlightRegionType.CLASS'); 952 expect(HighlightRegionType.CLASS.toString(), 'HighlightRegionType.CLASS');
955 } 953 }
956 954
957 void test_valueOf_unknown() { 955 void test_valueOf_unknown() {
958 expect(() { 956 expect(() {
959 new HighlightRegionType('no-such-type'); 957 new HighlightRegionType('no-such-type');
960 }, throws); 958 }, throws);
961 } 959 }
962 } 960 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698