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 analyzer.test.generated.utilities_test; | 5 library analyzer.test.generated.utilities_test; |
6 | 6 |
7 import 'dart:collection'; | 7 import 'dart:collection'; |
8 | 8 |
9 import 'package:analyzer/dart/ast/ast.dart'; | 9 import 'package:analyzer/dart/ast/ast.dart'; |
10 import 'package:analyzer/src/dart/ast/utilities.dart'; | 10 import 'package:analyzer/src/dart/ast/utilities.dart'; |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 } | 271 } |
272 | 272 |
273 void test_visitCompilationUnit_directive() { | 273 void test_visitCompilationUnit_directive() { |
274 _assertCloneUnit('library l;'); | 274 _assertCloneUnit('library l;'); |
275 } | 275 } |
276 | 276 |
277 void test_visitCompilationUnit_directive_declaration() { | 277 void test_visitCompilationUnit_directive_declaration() { |
278 _assertCloneUnit('library l; var a;'); | 278 _assertCloneUnit('library l; var a;'); |
279 } | 279 } |
280 | 280 |
| 281 void test_visitCompilationUnit_directive_withComment() { |
| 282 _assertCloneUnit(r''' |
| 283 /// aaa |
| 284 /// bbb |
| 285 library l;'''); |
| 286 } |
| 287 |
281 void test_visitCompilationUnit_empty() { | 288 void test_visitCompilationUnit_empty() { |
282 _assertCloneUnit(''); | 289 _assertCloneUnit(''); |
283 } | 290 } |
284 | 291 |
285 void test_visitCompilationUnit_script() { | 292 void test_visitCompilationUnit_script() { |
286 _assertCloneUnit('#!/bin/dartvm'); | 293 _assertCloneUnit('#!/bin/dartvm'); |
287 } | 294 } |
288 | 295 |
289 void test_visitCompilationUnit_script_declaration() { | 296 void test_visitCompilationUnit_script_declaration() { |
290 _assertCloneUnit('#!/bin/dartvm \n var a;'); | 297 _assertCloneUnit('#!/bin/dartvm \n var a;'); |
(...skipping 4006 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4297 } | 4304 } |
4298 | 4305 |
4299 void test_get_added() { | 4306 void test_get_added() { |
4300 TokenMap tokenMap = new TokenMap(); | 4307 TokenMap tokenMap = new TokenMap(); |
4301 Token key = TokenFactory.tokenFromType(TokenType.AT); | 4308 Token key = TokenFactory.tokenFromType(TokenType.AT); |
4302 Token value = TokenFactory.tokenFromType(TokenType.AT); | 4309 Token value = TokenFactory.tokenFromType(TokenType.AT); |
4303 tokenMap.put(key, value); | 4310 tokenMap.put(key, value); |
4304 expect(tokenMap.get(key), same(value)); | 4311 expect(tokenMap.get(key), same(value)); |
4305 } | 4312 } |
4306 } | 4313 } |
OLD | NEW |