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.engine_test; | 5 library analyzer.test.generated.engine_test; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 | 8 |
9 import 'package:analyzer/source/embedder.dart'; | 9 import 'package:analyzer/source/embedder.dart'; |
10 import 'package:analyzer/src/context/cache.dart'; | 10 import 'package:analyzer/src/context/cache.dart'; |
11 import 'package:analyzer/src/generated/ast.dart'; | 11 import 'package:analyzer/src/generated/ast.dart'; |
12 import 'package:analyzer/src/generated/constant.dart'; | 12 import 'package:analyzer/src/generated/constant.dart'; |
13 import 'package:analyzer/src/generated/element.dart'; | 13 import 'package:analyzer/src/generated/element.dart'; |
14 import 'package:analyzer/src/generated/engine.dart'; | 14 import 'package:analyzer/src/generated/engine.dart'; |
15 import 'package:analyzer/src/generated/error.dart'; | 15 import 'package:analyzer/src/generated/error.dart'; |
16 import 'package:analyzer/src/generated/html.dart' as ht; | |
17 import 'package:analyzer/src/generated/java_core.dart'; | 16 import 'package:analyzer/src/generated/java_core.dart'; |
18 import 'package:analyzer/src/generated/resolver.dart'; | 17 import 'package:analyzer/src/generated/resolver.dart'; |
19 import 'package:analyzer/src/generated/source_io.dart'; | 18 import 'package:analyzer/src/generated/source_io.dart'; |
20 import 'package:analyzer/src/string_source.dart'; | 19 import 'package:analyzer/src/string_source.dart'; |
21 import 'package:analyzer/task/model.dart'; | 20 import 'package:analyzer/task/model.dart'; |
22 import 'package:html/dom.dart' show Document; | 21 import 'package:html/dom.dart' show Document; |
23 import 'package:typed_mock/typed_mock.dart'; | 22 import 'package:typed_mock/typed_mock.dart'; |
24 import 'package:unittest/unittest.dart'; | 23 import 'package:unittest/unittest.dart'; |
25 | 24 |
26 import '../reflective_tests.dart'; | 25 import '../reflective_tests.dart'; |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 return null; | 303 return null; |
305 } | 304 } |
306 | 305 |
307 @override | 306 @override |
308 CachePartition get privateAnalysisCachePartition { | 307 CachePartition get privateAnalysisCachePartition { |
309 fail("Unexpected invocation of privateAnalysisCachePartition"); | 308 fail("Unexpected invocation of privateAnalysisCachePartition"); |
310 return null; | 309 return null; |
311 } | 310 } |
312 | 311 |
313 @override | 312 @override |
314 ResolverVisitorFactory get resolverVisitorFactory { | |
315 fail("Unexpected invocation of getResolverVisitorFactory"); | |
316 return null; | |
317 } | |
318 | |
319 @override | |
320 SourceFactory get sourceFactory { | 313 SourceFactory get sourceFactory { |
321 fail("Unexpected invocation of getSourceFactory"); | 314 fail("Unexpected invocation of getSourceFactory"); |
322 return null; | 315 return null; |
323 } | 316 } |
324 | 317 |
325 @override | 318 @override |
326 void set sourceFactory(SourceFactory factory) { | 319 void set sourceFactory(SourceFactory factory) { |
327 fail("Unexpected invocation of setSourceFactory"); | 320 fail("Unexpected invocation of setSourceFactory"); |
328 } | 321 } |
329 | 322 |
330 @override | 323 @override |
331 List<Source> get sources { | 324 List<Source> get sources { |
332 fail("Unexpected invocation of sources"); | 325 fail("Unexpected invocation of sources"); |
333 return null; | 326 return null; |
334 } | 327 } |
335 | 328 |
336 @override | 329 @override |
337 TypeProvider get typeProvider { | 330 TypeProvider get typeProvider { |
338 fail("Unexpected invocation of getTypeProvider"); | 331 fail("Unexpected invocation of getTypeProvider"); |
339 return null; | 332 return null; |
340 } | 333 } |
341 | 334 |
342 @override | 335 @override |
343 void set typeProvider(TypeProvider typeProvider) { | 336 void set typeProvider(TypeProvider typeProvider) { |
344 fail("Unexpected invocation of set typeProvider"); | 337 fail("Unexpected invocation of set typeProvider"); |
345 } | 338 } |
346 | 339 |
347 @override | 340 @override |
348 TypeResolverVisitorFactory get typeResolverVisitorFactory { | |
349 fail("Unexpected invocation of getTypeResolverVisitorFactory"); | |
350 return null; | |
351 } | |
352 | |
353 @override | |
354 TypeSystem get typeSystem { | 341 TypeSystem get typeSystem { |
355 fail("Unexpected invocation of getTypeSystem"); | 342 fail("Unexpected invocation of getTypeSystem"); |
356 return null; | 343 return null; |
357 } | 344 } |
358 | 345 |
359 @override | 346 @override |
360 List<WorkManager> get workManagers { | 347 List<WorkManager> get workManagers { |
361 fail("Unexpected invocation of workManagers"); | 348 fail("Unexpected invocation of workManagers"); |
362 return null; | 349 return null; |
363 } | 350 } |
(...skipping 26 matching lines...) Expand all Loading... |
390 return null; | 377 return null; |
391 } | 378 } |
392 | 379 |
393 @override | 380 @override |
394 List<Source> computeExportedLibraries(Source source) { | 381 List<Source> computeExportedLibraries(Source source) { |
395 fail("Unexpected invocation of computeExportedLibraries"); | 382 fail("Unexpected invocation of computeExportedLibraries"); |
396 return null; | 383 return null; |
397 } | 384 } |
398 | 385 |
399 @override | 386 @override |
400 @deprecated | |
401 HtmlElement computeHtmlElement(Source source) { | |
402 fail("Unexpected invocation of computeHtmlElement"); | |
403 return null; | |
404 } | |
405 | |
406 @override | |
407 List<Source> computeImportedLibraries(Source source) { | 387 List<Source> computeImportedLibraries(Source source) { |
408 fail("Unexpected invocation of computeImportedLibraries"); | 388 fail("Unexpected invocation of computeImportedLibraries"); |
409 return null; | 389 return null; |
410 } | 390 } |
411 | 391 |
412 @override | 392 @override |
413 SourceKind computeKindOf(Source source) { | 393 SourceKind computeKindOf(Source source) { |
414 fail("Unexpected invocation of computeKindOf"); | 394 fail("Unexpected invocation of computeKindOf"); |
415 return null; | 395 return null; |
416 } | 396 } |
417 | 397 |
418 @override | 398 @override |
419 LibraryElement computeLibraryElement(Source source) { | 399 LibraryElement computeLibraryElement(Source source) { |
420 fail("Unexpected invocation of computeLibraryElement"); | 400 fail("Unexpected invocation of computeLibraryElement"); |
421 return null; | 401 return null; |
422 } | 402 } |
423 | 403 |
424 @override | 404 @override |
425 LineInfo computeLineInfo(Source source) { | 405 LineInfo computeLineInfo(Source source) { |
426 fail("Unexpected invocation of computeLineInfo"); | 406 fail("Unexpected invocation of computeLineInfo"); |
427 return null; | 407 return null; |
428 } | 408 } |
429 | 409 |
430 @override | 410 @override |
431 CompilationUnit computeResolvableCompilationUnit(Source source) { | |
432 fail("Unexpected invocation of computeResolvableCompilationUnit"); | |
433 return null; | |
434 } | |
435 | |
436 @override | |
437 Future<CompilationUnit> computeResolvedCompilationUnitAsync( | 411 Future<CompilationUnit> computeResolvedCompilationUnitAsync( |
438 Source source, Source librarySource) { | 412 Source source, Source librarySource) { |
439 fail("Unexpected invocation of getResolvedCompilationUnitFuture"); | 413 fail("Unexpected invocation of getResolvedCompilationUnitFuture"); |
440 return null; | 414 return null; |
441 } | 415 } |
442 | 416 |
443 @override | 417 @override |
444 Object computeResult(AnalysisTarget target, ResultDescriptor result) { | 418 Object computeResult(AnalysisTarget target, ResultDescriptor result) { |
445 fail("Unexpected invocation of computeResult"); | 419 fail("Unexpected invocation of computeResult"); |
446 return null; | 420 return null; |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
500 return null; | 474 return null; |
501 } | 475 } |
502 | 476 |
503 @override | 477 @override |
504 AnalysisErrorInfo getErrors(Source source) { | 478 AnalysisErrorInfo getErrors(Source source) { |
505 fail("Unexpected invocation of getErrors"); | 479 fail("Unexpected invocation of getErrors"); |
506 return null; | 480 return null; |
507 } | 481 } |
508 | 482 |
509 @override | 483 @override |
510 @deprecated | |
511 HtmlElement getHtmlElement(Source source) { | |
512 fail("Unexpected invocation of getHtmlElement"); | |
513 return null; | |
514 } | |
515 | |
516 @override | |
517 List<Source> getHtmlFilesReferencing(Source source) { | 484 List<Source> getHtmlFilesReferencing(Source source) { |
518 fail("Unexpected invocation of getHtmlFilesReferencing"); | 485 fail("Unexpected invocation of getHtmlFilesReferencing"); |
519 return null; | 486 return null; |
520 } | 487 } |
521 | 488 |
522 @override | 489 @override |
523 SourceKind getKindOf(Source source) { | 490 SourceKind getKindOf(Source source) { |
524 fail("Unexpected invocation of getKindOf"); | 491 fail("Unexpected invocation of getKindOf"); |
525 return null; | 492 return null; |
526 } | 493 } |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
581 } | 548 } |
582 | 549 |
583 @override | 550 @override |
584 CompilationUnit getResolvedCompilationUnit2( | 551 CompilationUnit getResolvedCompilationUnit2( |
585 Source unitSource, Source librarySource) { | 552 Source unitSource, Source librarySource) { |
586 fail("Unexpected invocation of getResolvedCompilationUnit"); | 553 fail("Unexpected invocation of getResolvedCompilationUnit"); |
587 return null; | 554 return null; |
588 } | 555 } |
589 | 556 |
590 @override | 557 @override |
591 @deprecated | |
592 ht.HtmlUnit getResolvedHtmlUnit(Source htmlSource) { | |
593 fail("Unexpected invocation of getResolvedHtmlUnit"); | |
594 return null; | |
595 } | |
596 | |
597 @override | |
598 Object getResult(AnalysisTarget target, ResultDescriptor result) { | 558 Object getResult(AnalysisTarget target, ResultDescriptor result) { |
599 fail("Unexpected invocation of getResult"); | 559 fail("Unexpected invocation of getResult"); |
600 return null; | 560 return null; |
601 } | 561 } |
602 | 562 |
603 @override | 563 @override |
604 List<Source> getSourcesWithFullName(String path) { | 564 List<Source> getSourcesWithFullName(String path) { |
605 fail("Unexpected invocation of getSourcesWithFullName"); | 565 fail("Unexpected invocation of getSourcesWithFullName"); |
606 return null; | 566 return null; |
607 } | 567 } |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
642 return null; | 602 return null; |
643 } | 603 } |
644 | 604 |
645 @override | 605 @override |
646 Document parseHtmlDocument(Source source) { | 606 Document parseHtmlDocument(Source source) { |
647 fail("Unexpected invocation of parseHtmlDocument"); | 607 fail("Unexpected invocation of parseHtmlDocument"); |
648 return null; | 608 return null; |
649 } | 609 } |
650 | 610 |
651 @override | 611 @override |
652 ht.HtmlUnit parseHtmlUnit(Source source) { | |
653 fail("Unexpected invocation of parseHtmlUnit"); | |
654 return null; | |
655 } | |
656 | |
657 @override | |
658 AnalysisResult performAnalysisTask() { | 612 AnalysisResult performAnalysisTask() { |
659 fail("Unexpected invocation of performAnalysisTask"); | 613 fail("Unexpected invocation of performAnalysisTask"); |
660 return null; | 614 return null; |
661 } | 615 } |
662 | 616 |
663 @override | 617 @override |
664 void recordLibraryElements(Map<Source, LibraryElement> elementMap) { | 618 void recordLibraryElements(Map<Source, LibraryElement> elementMap) { |
665 fail("Unexpected invocation of recordLibraryElements"); | 619 fail("Unexpected invocation of recordLibraryElements"); |
666 } | 620 } |
667 | 621 |
(...skipping 10 matching lines...) Expand all Loading... |
678 } | 632 } |
679 | 633 |
680 @override | 634 @override |
681 CompilationUnit resolveCompilationUnit2( | 635 CompilationUnit resolveCompilationUnit2( |
682 Source unitSource, Source librarySource) { | 636 Source unitSource, Source librarySource) { |
683 fail("Unexpected invocation of resolveCompilationUnit"); | 637 fail("Unexpected invocation of resolveCompilationUnit"); |
684 return null; | 638 return null; |
685 } | 639 } |
686 | 640 |
687 @override | 641 @override |
688 @deprecated | |
689 ht.HtmlUnit resolveHtmlUnit(Source htmlSource) { | |
690 fail("Unexpected invocation of resolveHtmlUnit"); | |
691 return null; | |
692 } | |
693 | |
694 @override | |
695 void setChangedContents(Source source, String contents, int offset, | 642 void setChangedContents(Source source, String contents, int offset, |
696 int oldLength, int newLength) { | 643 int oldLength, int newLength) { |
697 fail("Unexpected invocation of setChangedContents"); | 644 fail("Unexpected invocation of setChangedContents"); |
698 } | 645 } |
699 | 646 |
700 @override | 647 @override |
701 void setConfigurationData(ResultDescriptor key, Object data) { | 648 void setConfigurationData(ResultDescriptor key, Object data) { |
702 fail("Unexpected invocation of setConfigurationData"); | 649 fail("Unexpected invocation of setConfigurationData"); |
703 } | 650 } |
704 | 651 |
(...skipping 12 matching lines...) Expand all Loading... |
717 void test_flushAstStructures(Source source) { | 664 void test_flushAstStructures(Source source) { |
718 fail("Unexpected invocation of test_flushAstStructures"); | 665 fail("Unexpected invocation of test_flushAstStructures"); |
719 } | 666 } |
720 | 667 |
721 @override | 668 @override |
722 bool validateCacheConsistency() { | 669 bool validateCacheConsistency() { |
723 fail("Unexpected invocation of validateCacheConsistency"); | 670 fail("Unexpected invocation of validateCacheConsistency"); |
724 return false; | 671 return false; |
725 } | 672 } |
726 | 673 |
727 @deprecated | |
728 @override | |
729 void visitCacheItems(void callback( | |
730 Source source, dynamic dartEntry, dynamic rowDesc, CacheState state)) { | |
731 fail("Unexpected invocation of visitCacheItems"); | |
732 } | |
733 | |
734 @override | 674 @override |
735 void visitContentCache(ContentCacheVisitor visitor) { | 675 void visitContentCache(ContentCacheVisitor visitor) { |
736 fail("Unexpected invocation of visitContentCache"); | 676 fail("Unexpected invocation of visitContentCache"); |
737 } | 677 } |
738 } | 678 } |
OLD | NEW |