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

Side by Side Diff: pkg/analyzer/test/src/summary/linker_test.dart

Issue 1951173005: Add typedef support to summary linker. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 import 'package:analyzer/dart/element/type.dart'; 5 import 'package:analyzer/dart/element/type.dart';
6 import 'package:analyzer/src/summary/format.dart'; 6 import 'package:analyzer/src/summary/format.dart';
7 import 'package:analyzer/src/summary/link.dart'; 7 import 'package:analyzer/src/summary/link.dart';
8 import 'package:unittest/unittest.dart'; 8 import 'package:unittest/unittest.dart';
9 9
10 import '../../reflective_tests.dart'; 10 import '../../reflective_tests.dart';
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
580 expect(gTypeElement.implicitFunctionTypeIndices, [1]); 580 expect(gTypeElement.implicitFunctionTypeIndices, [1]);
581 ParameterElementForLink h = gTypeElement.parameters[3]; 581 ParameterElementForLink h = gTypeElement.parameters[3];
582 FunctionType hType = h.type; 582 FunctionType hType = h.type;
583 FunctionElementForLink_FunctionTypedParam hTypeElement = hType.element; 583 FunctionElementForLink_FunctionTypedParam hTypeElement = hType.element;
584 expect(hTypeElement.implicitFunctionTypeIndices, [1, 3]); 584 expect(hTypeElement.implicitFunctionTypeIndices, [1, 3]);
585 } 585 }
586 586
587 void test_parameterParentElementForLink_innermostExecutable() { 587 void test_parameterParentElementForLink_innermostExecutable() {
588 createLinker('void f(void g(void h())) {}'); 588 createLinker('void f(void g(void h())) {}');
589 TopLevelFunctionElementForLink f = testLibrary.getContainedName('f'); 589 TopLevelFunctionElementForLink f = testLibrary.getContainedName('f');
590 expect(f.innermostExecutable, same(f)); 590 expect(f.typeParameterContext, same(f));
591 ParameterElementForLink g = f.parameters[0]; 591 ParameterElementForLink g = f.parameters[0];
592 FunctionType gType = g.type; 592 FunctionType gType = g.type;
593 FunctionElementForLink_FunctionTypedParam gTypeElement = gType.element; 593 FunctionElementForLink_FunctionTypedParam gTypeElement = gType.element;
594 expect(gTypeElement.innermostExecutable, same(f)); 594 expect(gTypeElement.typeParameterContext, same(f));
595 ParameterElementForLink h = gTypeElement.parameters[0]; 595 ParameterElementForLink h = gTypeElement.parameters[0];
596 FunctionType hType = h.type; 596 FunctionType hType = h.type;
597 FunctionElementForLink_FunctionTypedParam hTypeElement = hType.element; 597 FunctionElementForLink_FunctionTypedParam hTypeElement = hType.element;
598 expect(hTypeElement.innermostExecutable, same(f)); 598 expect(hTypeElement.typeParameterContext, same(f));
599 } 599 }
600 } 600 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/summary/link.dart ('k') | pkg/analyzer/test/src/task/strong/inferred_type_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698