| 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 library test.analysis.notification.highlights2; |     5 library test.analysis.notification.highlights2; | 
|     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 803 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   814     break myLabel; |   814     break myLabel; | 
|   815   } |   815   } | 
|   816 } |   816 } | 
|   817 '''); |   817 '''); | 
|   818     return prepareHighlights().then((_) { |   818     return prepareHighlights().then((_) { | 
|   819       assertHasRegion(HighlightRegionType.LABEL, 'myLabel:'); |   819       assertHasRegion(HighlightRegionType.LABEL, 'myLabel:'); | 
|   820       assertHasRegion(HighlightRegionType.LABEL, 'myLabel;'); |   820       assertHasRegion(HighlightRegionType.LABEL, 'myLabel;'); | 
|   821     }); |   821     }); | 
|   822   } |   822   } | 
|   823  |   823  | 
 |   824   test_LIBRARY_NAME_libraryDirective() { | 
 |   825     addTestFile(''' | 
 |   826 library my.lib.name; | 
 |   827 '''); | 
 |   828     return prepareHighlights().then((_) { | 
 |   829       assertHasStringRegion(HighlightRegionType.LIBRARY_NAME, 'my.lib.name'); | 
 |   830     }); | 
 |   831   } | 
 |   832  | 
 |   833   test_LIBRARY_NAME_partOfDirective() { | 
 |   834     _addLibraryForTestPart(); | 
 |   835     addTestFile(''' | 
 |   836 part of my.lib.name; | 
 |   837 '''); | 
 |   838     return prepareHighlights().then((_) { | 
 |   839       assertHasStringRegion(HighlightRegionType.LIBRARY_NAME, 'my.lib.name'); | 
 |   840     }); | 
 |   841   } | 
 |   842  | 
|   824   test_LITERAL_BOOLEAN() { |   843   test_LITERAL_BOOLEAN() { | 
|   825     addTestFile('var V = true;'); |   844     addTestFile('var V = true;'); | 
|   826     return prepareHighlights().then((_) { |   845     return prepareHighlights().then((_) { | 
|   827       assertHasRegion(HighlightRegionType.LITERAL_BOOLEAN, 'true;'); |   846       assertHasRegion(HighlightRegionType.LITERAL_BOOLEAN, 'true;'); | 
|   828     }); |   847     }); | 
|   829   } |   848   } | 
|   830  |   849  | 
|   831   test_LITERAL_DOUBLE() { |   850   test_LITERAL_DOUBLE() { | 
|   832     addTestFile('var V = 4.2;'); |   851     addTestFile('var V = 4.2;'); | 
|   833     return prepareHighlights().then((_) { |   852     return prepareHighlights().then((_) { | 
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1082   void test_toString() { |  1101   void test_toString() { | 
|  1083     expect(HighlightRegionType.CLASS.toString(), 'HighlightRegionType.CLASS'); |  1102     expect(HighlightRegionType.CLASS.toString(), 'HighlightRegionType.CLASS'); | 
|  1084   } |  1103   } | 
|  1085  |  1104  | 
|  1086   void test_valueOf_unknown() { |  1105   void test_valueOf_unknown() { | 
|  1087     expect(() { |  1106     expect(() { | 
|  1088       new HighlightRegionType('no-such-type'); |  1107       new HighlightRegionType('no-such-type'); | 
|  1089     }, throws); |  1108     }, throws); | 
|  1090   } |  1109   } | 
|  1091 } |  1110 } | 
| OLD | NEW |