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

Side by Side Diff: pkg/analyzer/test/generated/engine_test.dart

Issue 736603005: Rollback r41807. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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/analyzer/test/generated/element_test.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 // This code was auto-generated, is not intended to be edited, and is subject to 5 // This code was auto-generated, is not intended to be edited, and is subject to
6 // significant change. Please see the README file for more information. 6 // significant change. Please see the README file for more information.
7 7
8 library engine.engine_test; 8 library engine.engine_test;
9 9
10 import 'dart:collection'; 10 import 'dart:collection';
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 TimestampedData<String> contents = _context.getContents(source); 598 TimestampedData<String> contents = _context.getContents(source);
599 expect(contents.data.toString(), content); 599 expect(contents.data.toString(), content);
600 } 600 }
601 601
602 void test_getDeclaredVariables() { 602 void test_getDeclaredVariables() {
603 _context = AnalysisContextFactory.contextWithCore(); 603 _context = AnalysisContextFactory.contextWithCore();
604 expect(_context.declaredVariables, isNotNull); 604 expect(_context.declaredVariables, isNotNull);
605 } 605 }
606 606
607 void test_getElement() { 607 void test_getElement() {
608 Source source = _addSource('/test.dart', r''' 608 _context = AnalysisContextFactory.contextWithCore();
609 class A {} 609 _sourceFactory = _context.sourceFactory;
610 class B {} 610 LibraryElement core =
611 class C {} 611 _context.computeLibraryElement(_sourceFactory.forUri("dart:core"));
612 '''); 612 expect(core, isNotNull);
613 _analyzeAll_assertFinished(); 613 ClassElement classObject =
614 LibraryElement library = _context.computeLibraryElement(source); 614 _findClass(core.definingCompilationUnit, "Object");
615 ClassElement classB = library.definingCompilationUnit.getType('B'); 615 expect(classObject, isNotNull);
616 expect(classB, isNotNull); 616 ElementLocation location = classObject.location;
617 ElementLocation location = classB.location;
618 Element element = _context.getElement(location); 617 Element element = _context.getElement(location);
619 expect(element, same(classB)); 618 expect(element, same(classObject));
620 } 619 }
621 620
622 void test_getElement_constructor_named() { 621 void test_getElement_constructor_named() {
623 Source source = _addSource("/lib.dart", r''' 622 Source source = _addSource("/lib.dart", r'''
624 class A { 623 class A {
625 A.named() {} 624 A.named() {}
626 }'''); 625 }''');
627 _analyzeAll_assertFinished(); 626 _analyzeAll_assertFinished();
628 LibraryElement library = _context.computeLibraryElement(source); 627 LibraryElement library = _context.computeLibraryElement(source);
629 ClassElement classA = _findClass(library.definingCompilationUnit, "A"); 628 ClassElement classA = _findClass(library.definingCompilationUnit, "A");
(...skipping 6586 matching lines...) Expand 10 before | Expand all | Expand 10 after
7216 bool contains(Source source) => source == libB; 7215 bool contains(Source source) => source == libB;
7217 } 7216 }
7218 7217
7219 7218
7220 class _UniversalCachePartitionTest_test_setMaxCacheSize implements 7219 class _UniversalCachePartitionTest_test_setMaxCacheSize implements
7221 CacheRetentionPolicy { 7220 CacheRetentionPolicy {
7222 @override 7221 @override
7223 RetentionPriority getAstPriority(Source source, SourceEntry sourceEntry) => 7222 RetentionPriority getAstPriority(Source source, SourceEntry sourceEntry) =>
7224 RetentionPriority.LOW; 7223 RetentionPriority.LOW;
7225 } 7224 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/generated/element_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698