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

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

Issue 267293006: New analyzer snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « pkg/analyzer/pubspec.yaml ('k') | pkg/analyzer/test/generated/parser_test.dart » ('j') | 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.element_test; 8 library engine.element_test;
9 9
10 import 'package:analyzer/src/generated/java_core.dart'; 10 import 'package:analyzer/src/generated/java_core.dart';
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 282
283 void test_lookUpGetter_undeclared_recursive() { 283 void test_lookUpGetter_undeclared_recursive() {
284 LibraryElementImpl library = ElementFactory.library(createAnalysisContext(), "lib"); 284 LibraryElementImpl library = ElementFactory.library(createAnalysisContext(), "lib");
285 ClassElementImpl classA = ElementFactory.classElement2("A", []); 285 ClassElementImpl classA = ElementFactory.classElement2("A", []);
286 ClassElementImpl classB = ElementFactory.classElement("B", classA.type, []); 286 ClassElementImpl classB = ElementFactory.classElement("B", classA.type, []);
287 classA.supertype = classB.type; 287 classA.supertype = classB.type;
288 (library.definingCompilationUnit as CompilationUnitElementImpl).types = <Cla ssElement> [classA, classB]; 288 (library.definingCompilationUnit as CompilationUnitElementImpl).types = <Cla ssElement> [classA, classB];
289 JUnitTestCase.assertNull(classA.lookUpGetter("g", library)); 289 JUnitTestCase.assertNull(classA.lookUpGetter("g", library));
290 } 290 }
291 291
292 void test_lookUpInheritedMethod_declared() {
293 LibraryElementImpl library = ElementFactory.library(createAnalysisContext(), "lib");
294 ClassElementImpl classA = ElementFactory.classElement2("A", []);
295 String methodName = "m";
296 MethodElement method = ElementFactory.methodElement(methodName, null, []);
297 classA.methods = <MethodElement> [method];
298 (library.definingCompilationUnit as CompilationUnitElementImpl).types = <Cla ssElement> [classA];
299 JUnitTestCase.assertNull(classA.lookUpInheritedMethod(methodName, library));
300 }
301
302 void test_lookUpInheritedMethod_declaredAndInherited() {
303 LibraryElementImpl library = ElementFactory.library(createAnalysisContext(), "lib");
304 ClassElementImpl classA = ElementFactory.classElement2("A", []);
305 String methodName = "m";
306 MethodElement inheritedMethod = ElementFactory.methodElement(methodName, nul l, []);
307 classA.methods = <MethodElement> [inheritedMethod];
308 ClassElementImpl classB = ElementFactory.classElement("B", classA.type, []);
309 MethodElement method = ElementFactory.methodElement(methodName, null, []);
310 classB.methods = <MethodElement> [method];
311 (library.definingCompilationUnit as CompilationUnitElementImpl).types = <Cla ssElement> [classA, classB];
312 JUnitTestCase.assertSame(inheritedMethod, classB.lookUpInheritedMethod(metho dName, library));
313 }
314
315 void test_lookUpInheritedMethod_inherited() {
316 LibraryElementImpl library = ElementFactory.library(createAnalysisContext(), "lib");
317 ClassElementImpl classA = ElementFactory.classElement2("A", []);
318 String methodName = "m";
319 MethodElement inheritedMethod = ElementFactory.methodElement(methodName, nul l, []);
320 classA.methods = <MethodElement> [inheritedMethod];
321 ClassElementImpl classB = ElementFactory.classElement("B", classA.type, []);
322 (library.definingCompilationUnit as CompilationUnitElementImpl).types = <Cla ssElement> [classA, classB];
323 JUnitTestCase.assertSame(inheritedMethod, classB.lookUpInheritedMethod(metho dName, library));
324 }
325
326 void test_lookUpInheritedMethod_undeclared() {
327 LibraryElementImpl library = ElementFactory.library(createAnalysisContext(), "lib");
328 ClassElementImpl classA = ElementFactory.classElement2("A", []);
329 (library.definingCompilationUnit as CompilationUnitElementImpl).types = <Cla ssElement> [classA];
330 JUnitTestCase.assertNull(classA.lookUpInheritedMethod("m", library));
331 }
332
292 void test_lookUpMethod_declared() { 333 void test_lookUpMethod_declared() {
293 LibraryElementImpl library = ElementFactory.library(createAnalysisContext(), "lib"); 334 LibraryElementImpl library = ElementFactory.library(createAnalysisContext(), "lib");
294 ClassElementImpl classA = ElementFactory.classElement2("A", []); 335 ClassElementImpl classA = ElementFactory.classElement2("A", []);
295 String methodName = "m"; 336 String methodName = "m";
296 MethodElement method = ElementFactory.methodElement(methodName, null, []); 337 MethodElement method = ElementFactory.methodElement(methodName, null, []);
297 classA.methods = <MethodElement> [method]; 338 classA.methods = <MethodElement> [method];
298 (library.definingCompilationUnit as CompilationUnitElementImpl).types = <Cla ssElement> [classA]; 339 (library.definingCompilationUnit as CompilationUnitElementImpl).types = <Cla ssElement> [classA];
299 JUnitTestCase.assertSame(method, classA.lookUpMethod(methodName, library)); 340 JUnitTestCase.assertSame(method, classA.lookUpMethod(methodName, library));
300 } 341 }
301 342
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 runJUnitTest(__test, __test.test_lookUpGetter_inherited); 487 runJUnitTest(__test, __test.test_lookUpGetter_inherited);
447 }); 488 });
448 _ut.test('test_lookUpGetter_undeclared', () { 489 _ut.test('test_lookUpGetter_undeclared', () {
449 final __test = new ClassElementImplTest(); 490 final __test = new ClassElementImplTest();
450 runJUnitTest(__test, __test.test_lookUpGetter_undeclared); 491 runJUnitTest(__test, __test.test_lookUpGetter_undeclared);
451 }); 492 });
452 _ut.test('test_lookUpGetter_undeclared_recursive', () { 493 _ut.test('test_lookUpGetter_undeclared_recursive', () {
453 final __test = new ClassElementImplTest(); 494 final __test = new ClassElementImplTest();
454 runJUnitTest(__test, __test.test_lookUpGetter_undeclared_recursive); 495 runJUnitTest(__test, __test.test_lookUpGetter_undeclared_recursive);
455 }); 496 });
497 _ut.test('test_lookUpInheritedMethod_declared', () {
498 final __test = new ClassElementImplTest();
499 runJUnitTest(__test, __test.test_lookUpInheritedMethod_declared);
500 });
501 _ut.test('test_lookUpInheritedMethod_declaredAndInherited', () {
502 final __test = new ClassElementImplTest();
503 runJUnitTest(__test, __test.test_lookUpInheritedMethod_declaredAndInheri ted);
504 });
505 _ut.test('test_lookUpInheritedMethod_inherited', () {
506 final __test = new ClassElementImplTest();
507 runJUnitTest(__test, __test.test_lookUpInheritedMethod_inherited);
508 });
509 _ut.test('test_lookUpInheritedMethod_undeclared', () {
510 final __test = new ClassElementImplTest();
511 runJUnitTest(__test, __test.test_lookUpInheritedMethod_undeclared);
512 });
456 _ut.test('test_lookUpMethod_declared', () { 513 _ut.test('test_lookUpMethod_declared', () {
457 final __test = new ClassElementImplTest(); 514 final __test = new ClassElementImplTest();
458 runJUnitTest(__test, __test.test_lookUpMethod_declared); 515 runJUnitTest(__test, __test.test_lookUpMethod_declared);
459 }); 516 });
460 _ut.test('test_lookUpMethod_inherited', () { 517 _ut.test('test_lookUpMethod_inherited', () {
461 final __test = new ClassElementImplTest(); 518 final __test = new ClassElementImplTest();
462 runJUnitTest(__test, __test.test_lookUpMethod_inherited); 519 runJUnitTest(__test, __test.test_lookUpMethod_inherited);
463 }); 520 });
464 _ut.test('test_lookUpMethod_undeclared', () { 521 _ut.test('test_lookUpMethod_undeclared', () {
465 final __test = new ClassElementImplTest(); 522 final __test = new ClassElementImplTest();
(...skipping 3754 matching lines...) Expand 10 before | Expand all | Expand 10 after
4220 InterfaceTypeImplTest.dartSuite(); 4277 InterfaceTypeImplTest.dartSuite();
4221 TypeParameterTypeImplTest.dartSuite(); 4278 TypeParameterTypeImplTest.dartSuite();
4222 VoidTypeImplTest.dartSuite(); 4279 VoidTypeImplTest.dartSuite();
4223 ClassElementImplTest.dartSuite(); 4280 ClassElementImplTest.dartSuite();
4224 ElementLocationImplTest.dartSuite(); 4281 ElementLocationImplTest.dartSuite();
4225 ElementImplTest.dartSuite(); 4282 ElementImplTest.dartSuite();
4226 HtmlElementImplTest.dartSuite(); 4283 HtmlElementImplTest.dartSuite();
4227 LibraryElementImplTest.dartSuite(); 4284 LibraryElementImplTest.dartSuite();
4228 MultiplyDefinedElementImplTest.dartSuite(); 4285 MultiplyDefinedElementImplTest.dartSuite();
4229 } 4286 }
OLDNEW
« no previous file with comments | « pkg/analyzer/pubspec.yaml ('k') | pkg/analyzer/test/generated/parser_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698